Skip to content

[FIX] Predictions widget: handle similar but different domains #2129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 8, 2017
Merged

[FIX] Predictions widget: handle similar but different domains #2129

merged 4 commits into from
Apr 8, 2017

Conversation

jerneju
Copy link
Contributor

@jerneju jerneju commented Mar 22, 2017

Issue

Widget throws an error similar to "index 1 is out of bounds for axis 0 with size 1". That occurs when predictions which are sent to Predictions widget are made from a data with different domain than a domain which is also sent to that widget. For instance, predictions predict only two possible target values but the data has also a third value.
https://sentry.io/biolab/orange3/issues/223474227/
https://sentry.io/biolab/orange3/issues/216151441/

Description of changes

Predictions table is extended to match the number of the data target's values.

Includes
  • Code changes
  • Tests
  • Documentation

@jerneju
Copy link
Contributor Author

jerneju commented Mar 22, 2017

@jerneju
Copy link
Contributor Author

jerneju commented Mar 22, 2017

Copy link
Member

@markotoplak markotoplak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is misleading to show probabilities of zero for a class that did not exist in the train data. Only the probabilities for classes present in the train data should be shown.

Furthermore, even if the class of the test data is completely different than the class of the train data (all the values are different) the widget should still work. Perhaps a warning should be shown in this case.

@janezd
Copy link
Contributor

janezd commented Mar 31, 2017

Could you consider this PR in the light of #2183, which slightly changes the meaning of the widget's attribute class_var to represent the (common!) class of predictors? Are the two PRs in any conflict (not in terms of code, but does merging of one break the other?).

If it does, I'd prefer merging #2183 first, since it fixes a more critical bug.

@markotoplak
Copy link
Member

It seems that with changes from #2183 the problem does not appear anymore.

@markotoplak markotoplak closed this Apr 7, 2017
@markotoplak markotoplak reopened this Apr 7, 2017
@markotoplak markotoplak added this to the 3.4.2 milestone Apr 7, 2017
@codecov-io
Copy link

codecov-io commented Apr 7, 2017

Codecov Report

Merging #2129 into master will decrease coverage by 0.85%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2129      +/-   ##
==========================================
- Coverage   72.02%   71.17%   -0.86%     
==========================================
  Files         318      318              
  Lines       54580    54691     +111     
==========================================
- Hits        39309    38924     -385     
- Misses      15271    15767     +496

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0858e4a...5937454. Read the comment docs.

@markotoplak markotoplak dismissed their stale review April 7, 2017 12:59

Too complicated for now.

@markotoplak markotoplak merged commit 22196a6 into biolab:master Apr 8, 2017
@jerneju jerneju deleted the index-predictions branch April 20, 2017 13:48
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.

4 participants