0

sklearn defines a large number of pairwise distance metrics for something like silhouette score: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise_distances.html

For e.g. it can be initiated with any of these distance metrics: [‘cityblock’, ‘cosine’, ‘euclidean’, ‘l1’, ‘l2’, ‘manhattan’]

However, say I go to use KElbowVisualizer from yellowbrick. I can pass in silhouette as the metric as follows:

KElbowVisualizer(KMeans(), k=(4, 12), metric='silhouette')

Which I assume uses the silhouette score default distance metric, 'euclidean'. Is it possible to run KElbowVisualizer using a different distance metric than the default?

plamb
  • 5,636
  • 1
  • 18
  • 31

1 Answers1

0

This functionality was recently added to the development branch and should be released in v1.5.

https://github.com/DistrictDataLabs/yellowbrick/pull/1238

larrywgray
  • 993
  • 1
  • 7
  • 14