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] MDS: Support distances without domain information #2335

Merged
merged 5 commits into from
Jun 16, 2017
Merged

[FIX] MDS: Support distances without domain information #2335

merged 5 commits into from
Jun 16, 2017

Conversation

jerneju
Copy link
Contributor

@jerneju jerneju commented May 23, 2017

Issue

screenshot_20170523_124611

Description of changes
Includes
  • Code changes
  • Tests
  • Documentation

@jerneju
Copy link
Contributor Author

jerneju commented May 23, 2017

@jerneju
Copy link
Contributor Author

jerneju commented May 23, 2017

@jerneju jerneju changed the title [WIP][FIX] MDS: Support distances without domain information [FIX] MDS: Support distances without domain information May 29, 2017
@@ -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]:
Copy link
Contributor

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.

@@ -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]
Copy link
Contributor

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-io
Copy link

codecov-io commented Jun 14, 2017

Codecov Report

Merging #2335 into master will increase coverage by 0.02%.
The diff coverage is 78.04%.

@@            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

@jerneju
Copy link
Contributor Author

jerneju commented Jun 14, 2017

@lanzagar lanzagar added this to the 3.4.4 milestone Jun 16, 2017
self.colorvar_model[:] = ["Same color"]

self.color_value = "Same shape"
self.shape_value = "Same color"
Copy link
Contributor

Choose a reason for hiding this comment

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

These two are switched :)

@lanzagar lanzagar merged commit 8d882bf into biolab:master Jun 16, 2017
@jerneju jerneju deleted the attribute-mds branch June 21, 2017 07:23
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.

4 participants