scikit-learn/sklearn/cluster
Peter Fischer 6cb51b2a28 Initialize ARPACK eigsh
`v0 = random_state.rand(M.shape[0])` leads to an initial residual vector in ARPACK which is all positive. However, this is not the absolute or squared residual, but a true difference. Thus, it is better to initialize with `v0=random_state.uniform(-1, 1, M.shape[0])` to have an equally distributed sign. This is the way that ARPACK initializes the residuals.
The effect of the previous initialization is that eigsh frequently does not converge to the correct eigenvalues, e.g. negative eigenvalues for s.p.d. matrix, which leads to an incorrect null-space.

- initialized all occurences of sklearn.utils.arpack.eigsh the same way it would be initialzed by ARPACK
- regression test to test behavior of new initialization
2015-10-23 08:57:30 +02:00
..
tests MAINT move custom error/warning classes into sklearn.exceptions 2015-10-19 22:35:35 +02:00
__init__.py remove deprecated stuff from 0.17 2015-03-18 14:49:04 -04:00
_dbscan_inner.cpp ENH optimize DBSCAN by rewriting in Cython 2015-03-17 16:21:10 +01:00
_dbscan_inner.pyx ENH optimize DBSCAN by rewriting in Cython 2015-03-17 16:21:10 +01:00
_feature_agglomeration.py MAINT Removed deprecated stuff. 2015-10-21 10:24:23 +02:00
_hierarchical.cpp BUG: work aroundd Cython bug to build with clang 2014-02-17 15:27:10 +01:00
_hierarchical.pyx ENH: Py3 support 2014-02-04 23:45:08 +01:00
_k_means.c Nest the for loops because they don't need to run if the condition is not true. 2015-04-11 12:07:34 +03:00
_k_means.pyx Nest the for loops because they don't need to run if the condition is not true. 2015-04-11 12:07:34 +03:00
affinity_propagation_.py DOC adding backlinks to docstrings 2015-06-03 00:24:04 -04:00
bicluster.py Initialize ARPACK eigsh 2015-10-23 08:57:30 +02:00
birch.py MAINT move custom error/warning classes into sklearn.exceptions 2015-10-19 22:35:35 +02:00
dbscan_.py MAINT Removed deprecated stuff. 2015-10-21 10:24:23 +02:00
hierarchical.py MAINT Removed deprecated stuff. 2015-10-21 10:24:23 +02:00
k_means_.py FIX Don't compare arrays to strings!!!! 2015-10-15 16:07:17 -04:00
mean_shift_.py MAINT Removed deprecated stuff. 2015-10-21 10:24:23 +02:00
setup.py ENH optimize DBSCAN by rewriting in Cython 2015-03-17 16:21:10 +01:00
spectral.py DOC adding backlinks to docstrings 2015-06-03 00:24:04 -04:00