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][RFC] KMeans upgrade sparse support #3140

Merged
merged 5 commits into from
Jul 24, 2018

Conversation

robertcv
Copy link
Collaborator

Issue

Fixes #2913
Additionally, I noticed that you can not predict sparse data.

Description of changes

Replaced len(X) with X.shape[0].

Includes
  • Code changes
  • Tests
  • Documentation

@ajdapretnar
Copy link
Contributor

Would you mind adding a nice informative error when the user connects pure Corpus into k-Means (without bag of words)? Now the error is useless. It should say something like: "Data has no attributes." or "Data is missing features."

@robertcv
Copy link
Collaborator Author

@ajdapretnar I can add it but this pull request is probably not the right place for it.

@ajdapretnar
Copy link
Contributor

Ok, let's have it in a different PR then. As far as I am concerned, this PR works.

@ajdapretnar
Copy link
Contributor

Would you mind making pylint happy, so the tests will pass? :) 🙈

third party import "import numpy as np" should be placed before "import Orange"

@codecov-io
Copy link

Codecov Report

Merging #3140 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master    #3140   +/-   ##
=======================================
  Coverage   82.33%   82.33%           
=======================================
  Files         335      335           
  Lines       58180    58180           
=======================================
  Hits        47901    47901           
  Misses      10279    10279

@ajdapretnar ajdapretnar merged commit e62e855 into biolab:master Jul 24, 2018
@robertcv robertcv deleted the fixes/kmeans_sparse branch May 31, 2019 11:30
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