Skip to content

OWConfusionMatrix: Fix predicitons order#1751

Closed
nikicc wants to merge 1 commit intobiolab:masterfrom
nikicc:confusion-matrix-selection-fix
Closed

OWConfusionMatrix: Fix predicitons order#1751
nikicc wants to merge 1 commit intobiolab:masterfrom
nikicc:confusion-matrix-selection-fix

Conversation

@nikicc
Copy link
Contributor

@nikicc nikicc commented Nov 14, 2016

Issue

In confusion matrix, as of #1655 (commit deb8585), predictions were appended to the data in incorrect order. The core of the issue is due to the fact that predictions from Results.predicted are not in the same order as instances in data table.

For example, select only misclassified examples on iris and pass them to a table. Some of the misclassified examples have a predicted class that is the same as the correct one.
screen shot 2016-11-14 at 16 27 06

Description of changes

Predictions from Results.predicted are first sorted into the order of data instances and only then appended.

Includes
  • Code changes
  • Tests
  • Documentation

The order of predictions commign from `self.results.predicted` is different than the order of examples in data table. Hence, to append predictions to data table, the correct order must first be restored.
@nikicc
Copy link
Contributor Author

nikicc commented Nov 14, 2016

Tests seem to fail due to an unrelated issue with RandomForestRegression.

@janezd
Copy link
Contributor

janezd commented Nov 14, 2016

@nikicc is there any relation or interaction between this and #1720?

@nikicc
Copy link
Contributor Author

nikicc commented Nov 14, 2016

@janezd yes, #1720 also fixes this issues hence I'm closing this PR.

@nikicc nikicc closed this Nov 14, 2016
@nikicc nikicc deleted the confusion-matrix-selection-fix branch April 21, 2017 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants