question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

x_squared_norms is not used in _labels_inertia_precompute_dense

See original GitHub issue

https://github.com/scikit-learn/scikit-learn/blob/00f3910678d2b64ddc5be81255a093b97396c580/sklearn/cluster/_kmeans.py#L474

The function _labels_inertia_precompute_dense recieves x_squared_norms as argument but it is not used.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
glemaitrecommented, Jan 9, 2020

Be aware that we have #11950 which will be a more optimal implementation and should come soon. But we might want to solve the other problems in the meanwhile.

1reaction
kno10commented, Jan 9, 2020

precompute_distances is a misnomer. It’s doing some batch computation, but there is nothing “precomputed”. Also, I found it to only ever hurt performance, not help: 19 seconds vs. 11 seconds.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found