-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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] MDS: No optimization when subset data #2675
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2675 +/- ##
=========================================
Coverage ? 75.81%
=========================================
Files ? 338
Lines ? 59497
Branches ? 0
=========================================
Hits ? 45107
Misses ? 14390
Partials ? 0 |
Both commits seem OK to me if this is what we want to do with sparse data. @nikicc, @ajdapretnar please confirm. |
Add tests for sparse data. |
This now works! |
Orange/widgets/unsupervised/owmds.py
Outdated
@@ -271,6 +271,8 @@ def update_regression_line(self): | |||
|
|||
def init_attr_values(self): | |||
domain = self.data and len(self.data) and self.data.domain or None | |||
if domain is not None and self.data.is_sparse(): | |||
domain = Domain(attributes=[], class_vars=domain.class_vars) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only class variables here? What about metas? If this is only here with the purpose of removing sparse features, I would prefer if we use filter_visible
method from Orange.data.domain
that is used elsewhere (e.g. select rows).
I'm not really a fan of filter_visible
, but let's keep the same approach everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should support filtering by filter_visible
in the model so we got this fixed once and for all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#2690 should probably solve this issue.
Orange/widgets/unsupervised/owmds.py
Outdated
|
||
attributes = self.data.domain.attributes + (self.variable_x, self.variable_y) + \ | ||
primitive_metas | ||
if self.data.is_sparse(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need a different logic for sparse here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, on hover doesn't show all data for sparse. Is there a special reason for this? |
Not relevant any more, the code in question was moved to #2693
Issue
1. MDS cannot handle sparse data.That will be fixed in #2690 .2. Optimization runs when subset data is sent to the widget. This is not necessary.
3. Plot resets when Show similar pairs slider is moved.
4. Similar pairs are not removed when Show similar pairs slider is set to 0. And they should be removed.
Description of changes
Includes