[FIX] MDS: Support distances without domain information#2335
Merged
lanzagar merged 5 commits intobiolab:masterfrom Jun 16, 2017
jerneju:attribute-mds
Merged
[FIX] MDS: Support distances without domain information#2335lanzagar merged 5 commits intobiolab:masterfrom jerneju:attribute-mds
lanzagar merged 5 commits intobiolab:masterfrom
jerneju:attribute-mds
Conversation
Contributor
Author
Contributor
Author
janezd
requested changes
Jun 9, 2017
Orange/widgets/unsupervised/owmds.py
Outdated
|
|
||
| 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]: |
Contributor
There was a problem hiding this comment.
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.
| 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] |
Contributor
There was a problem hiding this comment.
... 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 |
Contributor
Author
janezd
approved these changes
Jun 16, 2017
lanzagar
reviewed
Jun 16, 2017
Orange/widgets/unsupervised/owmds.py
Outdated
| self.colorvar_model[:] = ["Same color"] | ||
|
|
||
| self.color_value = "Same shape" | ||
| self.shape_value = "Same color" |
Contributor
There was a problem hiding this comment.
These two are switched :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Description of changes
Includes