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] Radviz: Enable projection for less than two selected variables #3444

Merged
merged 3 commits into from
Dec 8, 2018

Conversation

VesnaT
Copy link
Contributor

@VesnaT VesnaT commented Dec 6, 2018

Issue

If selecting less than two features (in features list box) to create projection, a warning is shown, which indicates inadequate setting and therefore should not be saved.

Includes
  • Code changes
  • Tests
  • Documentation

@VesnaT VesnaT changed the title Radviz: Do not save selected variables when showing warning [FIX] Radviz: Do not save selected variables when showing warning Dec 6, 2018
@janezd
Copy link
Contributor

janezd commented Dec 6, 2018

I'm not sure this is the expected behavior. When the user removes all attributes (or all except one), the widget shows a warning but keeps showing the last valid visualization. The graph should be cleared.

On the other hand, why not showing a radviz with a single attribute (data instances are spread between the center and the anchor) or without any attributes (all data instances are in the center)? Of course if this doesn't cause any other problems down the road.

I lean towards the second alternative but I'm happy with both. But if you opt for the first, I think you should clear the graph, and probably also set self.selected_vars to [].

@VesnaT
Copy link
Contributor Author

VesnaT commented Dec 8, 2018

I chose the second one to be consistent with Linear Projection.

@VesnaT VesnaT changed the title [FIX] Radviz: Do not save selected variables when showing warning [FIX] Radviz: Enable projection for less than two selected variables Dec 8, 2018
@codecov
Copy link

codecov bot commented Dec 8, 2018

Codecov Report

Merging #3444 into master will increase coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3444      +/-   ##
==========================================
+ Coverage   83.26%   83.28%   +0.01%     
==========================================
  Files         365      365              
  Lines       64306    64329      +23     
==========================================
+ Hits        53547    53577      +30     
+ Misses      10759    10752       -7

@janezd
Copy link
Contributor

janezd commented Dec 8, 2018

What about also removing no_features = widget.Msg("At least three numeric or categorical variables are required")? It can work with one, while with 0 it would be just empty.

Copy link
Contributor

@janezd janezd left a comment

Choose a reason for hiding this comment

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

This PR can be merged as it is, though I'd prefer if you can also remove the error message I commented above. If you don't, please add an issue.

@VesnaT
Copy link
Contributor Author

VesnaT commented Dec 8, 2018

I removed the error message and added another fix.

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.

2 participants