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] Silhouette Plot: Fixes #1747

Merged
merged 2 commits into from
Nov 15, 2016

Conversation

ales-erjavec
Copy link
Contributor

Issue
  • When the number of clusters was the same as the number of instances the widget crashed with an ValueError: Number of labels is {num} Valid values are 2 to n_samples - 1 (inclusive) error from scikit-learn.
  • If the cluster column contained missing values the widget would crash with an assertion error (assert Ck[0] >= 0 and Ck[-1] < len(values)) in SilhouettePlot.setScores
Description of changes
  • Check (and show an error message) if the number of clusters is the same as the number of instances
  • Omit instances with missing cluster assignment from the display (and the "Selected Data" output) and show a warning when this happens. When the "Add silhouette scores" is selected, output missing values for scores corresponding to instances with unknown cluster assignment.
Includes
  • Code changes
  • Tests
  • Documentation

@codecov-io
Copy link

codecov-io commented Nov 11, 2016

Current coverage is 88.87% (diff: 100%)

Merging #1747 into master will not change coverage

@@             master      #1747   diff @@
==========================================
  Files            82         82          
  Lines          8819       8819          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           7838       7838          
  Misses          981        981          
  Partials          0          0          

Sunburst

Powered by Codecov. Last update 909a119...c7efeed

@lanzagar lanzagar merged commit fbf23ba into biolab:master Nov 15, 2016
@ales-erjavec ales-erjavec deleted the fixes/silhouette-n-clusters branch January 27, 2017 10:40
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.

3 participants