-
-
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: Support distances without domain information #2335
Conversation
Orange/widgets/unsupervised/owmds.py
Outdated
@@ -451,7 +451,7 @@ def _clear_plot(self): | |||
self._legend_item = None | |||
|
|||
def update_controls(self): | |||
if self.data is None and getattr(self.matrix, 'axis', 1) == 0: | |||
if self.data is None and getattr(self.matrix, 'axis', 1) in [0, 1]: |
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.
axis
is always either 0 or 1!
.. attribute:: axis
If axis=1 we calculate distances between rows,
if axis=0 we calculate distances between columns.
This check is then redundant.
Orange/widgets/unsupervised/owmds.py
Outdated
@@ -451,7 +451,7 @@ def _clear_plot(self): | |||
self._legend_item = None | |||
|
|||
def update_controls(self): | |||
if self.data is None and getattr(self.matrix, 'axis', 1) == 0: | |||
if self.data is None and getattr(self.matrix, 'axis', 1) in [0, 1]: | |||
# Column-wise distances | |||
attr = "Attribute names" | |||
self.labelvar_model[:] = ["No labels", attr] |
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.
... and if it's 1, the distance is computed over rows, so the widget shouldn't offer Attribute names as labels. The option should be called something like "Index". Offer it only for labels, but not for colors, shapes and sizes since it makes no sense there.
While your at it, fix old typeo: solor -> color.
Codecov Report
@@ Coverage Diff @@
## master #2335 +/- ##
==========================================
+ Coverage 74.14% 74.16% +0.02%
==========================================
Files 322 322
Lines 55933 55930 -3
==========================================
+ Hits 41471 41481 +10
+ Misses 14462 14449 -13 |
Orange/widgets/unsupervised/owmds.py
Outdated
self.colorvar_model[:] = ["Same color"] | ||
|
||
self.color_value = "Same shape" | ||
self.shape_value = "Same color" |
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.
These two are switched :)
Issue
Description of changes
Includes