I'm new to scikit.
I can't find an example using a precomputed distance matrix in Scikit KMeans.
Could anybody shed a light now this, better with an example?
Asked
Active
Viewed 1,902 times
6

csharpwinphonexaml
- 3,659
- 10
- 32
- 63

LeonL.
- 105
- 5
-
1Wrong site for an open-ended question like this. Please review our help files to see what kinds of questions are wanted and unwanted here. – Tom Zych Jul 04 '14 at 08:14
-
You can't unless you hack up the code. K-means is tied to Euclidean distances for speed reasons. – Fred Foo Jul 04 '14 at 12:04
1 Answers
1
Scikit-learn does not allow you to pass in a custom (precomputed) distance matrix. It can precompute Euclidean distance matrix to speed-up the process, but there's no way to use your own one without hacking the source.

Artem Sobolev
- 5,891
- 1
- 22
- 40