Skip to content
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

[FIX] OWMosaic: Fix crash for attribute with no values #1941

Merged
merged 1 commit into from
Jan 27, 2017

Conversation

VesnaT
Copy link
Contributor

@VesnaT VesnaT commented Jan 23, 2017

Issue

Fixes #1940

Description of changes
Includes
  • Code changes
  • Tests
  • Documentation

@codecov-io
Copy link

codecov-io commented Jan 23, 2017

Current coverage is 89.53% (diff: 100%)

Merging #1941 into master will increase coverage by <.01%

@@             master      #1941   diff @@
==========================================
  Files            90         90          
  Lines          9179       9180     +1   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           8218       8219     +1   
  Misses          961        961          
  Partials          0          0          

Sunburst

Powered by Codecov. Last update 53b0321...277240a

@VesnaT VesnaT added this to the 3.3.11 milestone Jan 23, 2017
@astaric
Copy link
Member

astaric commented Jan 24, 2017

Not sure how to test this. What I tried was adding a discrete variable with all missing values (using feature constructor) and using that in mosaic. It still crashed, but it might be a different problem.

@VesnaT
Copy link
Contributor Author

VesnaT commented Jan 24, 2017

Looks like that is another problem.

To test this use an existing dataset with feature with all missing values, since the problem occurred when the variable's "values" is empty.
It is impossible to construct discrete feature with no values with
feature constructor.

"Feature {} has no values".format(attrs[0]),
(self.canvas_view.width() - 120) / 2,
self.canvas_view.height() / 2)
return
Copy link
Contributor

Choose a reason for hiding this comment

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

I would put this before if, that is, fail in both cases, with Pearson or with class distribution. The visualization does not make sense if any attribute has no values.

Copy link
Contributor

Choose a reason for hiding this comment

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

screen shot 2017-01-24 at 21 13 31

"Class variable {} has no values".format(class_var),
(self.canvas_view.width() - 140) / 2,
self.canvas_view.height() / 2)
return
Copy link
Contributor

Choose a reason for hiding this comment

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

And then you can remove this.

@janezd
Copy link
Contributor

janezd commented Jan 24, 2017

@astaric, try this data: x.tab.zip

@lanzagar
Copy link
Contributor

I am merging this, but two bugs in Mosaic still remain (unrelated to this PR):

  • using anneal data and choosing feature bt crashes (I think this is what @astaric noticed)
  • Find Informative Mosaics (also on anneal) does not sort correctly (nan scores incomparable) - I think @janezd fixed the same issue in another widget's vizrank?

@lanzagar lanzagar merged commit 2801c12 into biolab:master Jan 27, 2017
astaric pushed a commit that referenced this pull request Feb 3, 2017
[FIX] OWMosaic: Fix crash for attribute with no values
(cherry picked from commit 2801c12)
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.

5 participants