Commit Graph

6 Commits

Author SHA1 Message Date
Lars Buitinck 3bc3d9f5ea ENH pairwise L1 distances for sparse matrices
Simple, O(n_features) temp space algorithm: densify row by row, then
subtract and compute L1 norm.

Added BLAS support code (cblas_dasum) to speed this up by a factor of
two on x86-64 w/ GCC and ATLAS for pair of 93% sparse matrices of shape
1000*3000. That's an order of magnitude faster than the dense version.

Also cleaned up chi2 kernel code while I was at it and added a nogil decl.
2014-03-24 10:38:01 +01:00
Andreas Mueller 98b188f2bf ENH add chi2 and exponentiated chi2 kernel. 2012-11-26 21:15:45 +00:00
Lars Buitinck 0dd841f6ee Revert (rebased) merge of euclidean_distances speedup
This reverts commits 38155aabe4
through ca703ae678 (inclusive).
2012-10-24 10:40:30 +02:00
Vlad Niculae bd7badb648 Clean setup.py in metrics 2012-10-23 15:50:25 +02:00
Vlad Niculae 7da9bf0759 Rename euclidean_fast to _euclidean_fast 2012-10-23 15:50:25 +02:00
Vlad Niculae 38155aabe4 First go at speeding up Euclidean distances 2012-10-23 15:50:23 +02:00