Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

glemaitre
Copy link
Member

@glemaitre glemaitre commented Feb 8, 2021

It seems to be an example where dense is not equivalent to sparse.

Related to an issue found in imbalanced-learn: scikit-learn-contrib/imbalanced-learn#788

@glemaitre glemaitre marked this pull request as draft February 8, 2021 17:30
@glemaitre glemaitre changed the title TST check sparse dense equivalence TST check sparse dense equivalence in KMeans Feb 8, 2021
@glemaitre glemaitre changed the title TST check sparse dense equivalence in KMeans [DEBUG] TST check sparse dense equivalence in KMeans Feb 8, 2021
@glemaitre glemaitre closed this Feb 8, 2021
@glemaitre
Copy link
Member Author

@jeremiedbb mentioned that it could be due to two initialization providing close results and that could be inter-exchange due to precision error depending on the system.

@jeremiedbb
Copy link
Member

Maybe we could select a better run only if its inertia is smaller than the current best by more than some eps here

if best_inertia is None or inertia < best_inertia:

something like if best_inertia is None or inertia < best_inertia - 1e-7: .

@ogrisel
Copy link
Member

ogrisel commented Feb 16, 2021

@jeremiedbb that sounds like a good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants