Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Cosine distance and L1-norm for KMeans #2850

Open
wants to merge 15 commits into from
+6,146 −3,591

1 participant

@mattilyra

Neither one of these added metrics has been added to the mini batch kmeans at this point.

mattilyra added some commits
@mattilyra mattilyra Added distance metric selection capability to kmeans._labels_inertia.…
… Current available metrics are L1 and L2 norm.
6e40def
@mattilyra mattilyra Added test to check labels assignment and inertia for L1 norm. 7b718e8
@mattilyra mattilyra Made test for labels assignment and inertia for L1 norm pass. 8599ff1
@mattilyra mattilyra Added implementations of L1 norm distance computations for dense and …
…sparse matrices.
99ce467
@mattilyra mattilyra Added a function to compute the cluster centers when using the L1 nor…
…m (the median of the datapoints in the cluster)).
22d23e7
@mattilyra mattilyra Added metric selection to sklearn.cluster.KMeans 68c8bb9
@mattilyra mattilyra Added cosine distance measure to KMeans. This just normalises the X v…
…ectors to have unit length before they are passed to the k_means function.
28891fe
@mattilyra mattilyra PEP8 formatting. ca09098
@mattilyra mattilyra Added a check to _k_init that ignores x_squared_norms if the metric i…
…s set the L1 norm.
e1af8b7
@mattilyra mattilyra Minor editing to comments. 1ddc004
@mattilyra mattilyra Added 'metric' field to function docstrings in cluster.k_means 4b84a62
@mattilyra mattilyra Fixed an error with _assign_empty_clusters in sklearn.cluster._k_mean…
…s.pyx where the datatype of n_samples_in_cluster was wrong and the dimensionality of distances was wrong.
02889c6
@mattilyra mattilyra Fixed a massive performance issue in _k_means._assign_labels_csr_L1 ecfea4b
@mattilyra mattilyra Added tests for 'L1-norm' and 'cosine distance' metrics for kmeans. T…
…ests currently do not pass.
092e45f
@mattilyra mattilyra Made tests for L1-norm and cosine distance pass for KMeans. 1981052
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 6, 2014
  1. @mattilyra

    Added distance metric selection capability to kmeans._labels_inertia.…

    mattilyra authored
    … Current available metrics are L1 and L2 norm.
  2. @mattilyra
  3. @mattilyra
  4. @mattilyra
  5. @mattilyra

    Added a function to compute the cluster centers when using the L1 nor…

    mattilyra authored
    …m (the median of the datapoints in the cluster)).
  6. @mattilyra
Commits on Feb 7, 2014
  1. @mattilyra

    Added cosine distance measure to KMeans. This just normalises the X v…

    mattilyra authored
    …ectors to have unit length before they are passed to the k_means function.
  2. @mattilyra

    PEP8 formatting.

    mattilyra authored
Commits on Feb 8, 2014
  1. @mattilyra
Commits on Feb 11, 2014
  1. @mattilyra

    Minor editing to comments.

    mattilyra authored
Commits on Feb 12, 2014
  1. @mattilyra
  2. @mattilyra

    Fixed an error with _assign_empty_clusters in sklearn.cluster._k_mean…

    mattilyra authored
    …s.pyx where the datatype of n_samples_in_cluster was wrong and the dimensionality of distances was wrong.
  3. @mattilyra
Commits on Feb 17, 2014
  1. @mattilyra

    Added tests for 'L1-norm' and 'cosine distance' metrics for kmeans. T…

    mattilyra authored
    …ests currently do not pass.
  2. @mattilyra
Something went wrong with that request. Please try again.