<p dir="auto">We should extend the <code class="notranslate">preprocessing.Scaler</code> / <code class="notranslate">preprocessing.scale</code> utilities to feature-wise scale sparse matrices to unit scale without trying to center the data first. This work should be done in a consistent way with the <code class="notranslate">RowNormalizer</code> refactoring (re-use low level cython functions).</p>
<p dir="auto">Please help me with my installation.<br>
I followed the guideline to install sklearn and numpy, but when I ran the nosetest, it kept showing the following testing message, and finally a failed message also cited below:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="     &quot; nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),&quot;
     .......................................................................
     &quot;Ran 1603 tests in 92.776s
      FAILED (SKIP=14, failures=1) &quot;"><pre class="notranslate"><code class="notranslate">     " nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),"
     .......................................................................
     "Ran 1603 tests in 92.776s
      FAILED (SKIP=14, failures=1) "
</code></pre></div>
<p dir="auto">Because the nosetest log is messy, I tried to excerpt non-repetitive paragraph for your diagnosis.</p>
<p dir="auto">I very appreciate your kind help.</p>
<h1 dir="auto"></h1>
<p dir="auto">Microsoft Windows [版本 6.1.7601]<br>
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.</p>
<p dir="auto">C:\Windows\system32&gt;python -c "import sklearn; sklearn.test()"<br>
Running unit tests and doctests for sklearn<br>
NumPy version 1.7.0<br>
NumPy is installed in C:\Python27\lib\site-packages\numpy<br>
Python version 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)<br>
]<br>
nose version 1.2.1<br>
I: Seeding RNGs with 369887653<br>
Converged after 58 iterations.<br>
...............................................................C:\Python27\lib\s<br>
ite-packages\sklearn\manifold\spectral_embedding.py:225: UserWarning: Graph is n<br>
ot fully connected, spectral embedding may not works as expected.<br>
warnings.warn("Graph is not fully connected, spectral embedding"<br>
..2.17927109077 55.4082834902<br>
........None<br>
.FFFFFFFFF.........S...............S............................................<br>
..............S.........................................................S..F....<br>
......................................SSS.......................C:\Python27\lib<br>
site-packages\sklearn\externals\joblib\test\test_func_inspect.py:122: UserWarnin<br>
g: Cannot inspect object &lt;functools.partial object at 0x07500900&gt;, ignore list w<br>
ill not work.<br>
nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
.............................___________________________________________________</p>
<hr>
<p dir="auto">test_memory setup</p>
<hr>
<hr>
<p dir="auto">test_memory teardown</p>
<hr>
<p dir="auto">..._____________________________________________________________________________</p>
<hr>
<p dir="auto">[Memory] Calling sklearn.externals.joblib.test.test_hashing.KlassWithCachedMetho<br>
d.f...<br>
f({ '#s12069__c_maps.nii.gz': [33],<br>
'#s12158__c_maps.nii.gz': [33],<br>
'#s12258__c_maps.nii.gz': [33],<br>
'#s12277__c_maps.nii.gz': [33],<br>
'#s12300__c_maps.nii.gz': [33],<br>
'#s12401__c_maps.nii.gz': [33],<br>
'#s12430__c_maps.nii.gz': [33],<br>
'#s13817__c_maps.nii.gz': [33],<br>
'#s13903__c_maps.nii.gz': [33],<br>
'#s13916__c_maps.nii.gz': [33],<br>
'#s13981__c_maps.nii.gz': [33],<br>
'#s13982__c_maps.nii.gz': [33],<br>
'#s13983__c_maps.nii.gz': [33]})<br>
________________________________________________________________f - 0.0s, 0.0min</p>
<p dir="auto">._______________________________________________________________________________<br>
_<br>
[Memory] Calling sklearn.externals.joblib.test.test_hashing.KlassWithCachedMetho<br>
d.f...<br>
f(set([ '#s12069__c_maps.nii.gz',<br>
'#s12158__c_maps.nii.gz',<br>
'#s12258__c_maps.nii.gz',<br>
'#s12277__c_maps.nii.gz',<br>
'#s12300__c_maps.nii.gz',<br>
'#s12401__c_maps.nii.gz',<br>
'#s12430__c_maps.nii.gz',<br>
'#s13817__c_maps.nii.gz',<br>
'#s13903__c_maps.nii.gz',<br>
'#s13916__c_maps.nii.gz',<br>
'#s13981__c_maps.nii.gz',<br>
'#s13982__c_maps.nii.gz',<br>
'#s13983__c_maps.nii.gz']))<br>
________________________________________________________________f - 0.0s, 0.0min</p>
<p dir="auto">..______________________________________________________________________________<br>
__<br>
test_memory setup</p>
<hr>
<p dir="auto">.............[Memory]    0.0s, 0.0min: Loading sklearn.externals.joblib.test.tes<br>
t_memory.f-alias from c:\users\navicat\appdata\local\temp\tmpydjb57\joblib\sklea<br>
rn\externals\joblib\test\test_memory\f-alias\48c4a83e3726da917be80d0e1edc1be1<br>
_____________________________________________f-alias cache loaded - 0.0s, 0.0min</p>
<p dir="auto">...[Memory]    0.0s, 0.0min: Loading sklearn.externals.joblib.test.test_memory.f<br>
-alias from c:\users\navicat\appdata\local\temp\tmpydjb57\joblib\sklearn\externa<br>
ls\joblib\test\test_memory\f-alias\48c4a83e3726da917be80d0e1edc1be1<br>
_____________________________________________f-alias cache loaded - 0.0s, 0.0min</p>
<p dir="auto">................................................................................<br>
........................________________________________________________________</p>
<hr>
<p dir="auto">test_memory teardown</p>
<hr>
<p dir="auto">._______________________________________________________________________________<br>
_<br>
setup numpy_pickle</p>
<hr>
<p dir="auto">.....................................C:\Python27\lib\site-packages\sklearn\exter<br>
nals\joblib\test\test_numpy_pickle.py:197: Warning: file "c:\users\navicat\appda<br>
ta\local\temp\tmpfsyive\test.pkl96" appears to be a zip, ignoring mmap_mode "r"<br>
flag passed<br>
numpy_pickle.load(this_filename, mmap_mode='r')<br>
.....___________________________________________________________________________</p>
<hr>
<p dir="auto">teardown numpy_pickle</p>
<hr>
<p dir="auto">.............S......C:\Python27\lib\site-packages\sklearn\feature_selection\univ<br>
ariate_selection.py:327: UserWarning: Duplicate scores. Result may depend on fea<br>
ture ordering.There are probably duplicate features, or you used a classificatio<br>
n score for a regression task.<br>
warn("Duplicate scores. Result may depend on feature ordering."<br>
...........C:\Python27\lib\site-packages\numpy\lib\utils.py:139: DeprecationWarn<br>
ing: <code class="notranslate">cs_graph_components</code> is deprecated!<br>
In the future, use csgraph.connected_components. Note that this new function has<br>
a slightly different interface: see the docstring for more information.<br>
warnings.warn(depdoc, DeprecationWarning)<br>
C:\Python27\lib\site-packages\numpy\lib\utils.py:139: DeprecationWarning: <code class="notranslate">cs_gr aph_components</code> is deprecated!<br>
In the future, use csgraph.connected_components. Note that this new function has<br>
a slightly different interface: see the docstring for more information.<br>
warnings.warn(depdoc, DeprecationWarning)<br>
.C:\Python27\lib\site-packages\numpy\lib\utils.py:139: DeprecationWarning: <code class="notranslate">cs_g raph_components</code> is deprecated!<br>
In the future, use csgraph.connected_components. Note that this new function has<br>
a slightly different interface: see the docstring for more information.<br>
warnings.warn(depdoc, DeprecationWarning)<br>
C:\Python27\lib\site-packages\numpy\lib\utils.py:139: DeprecationWarning: <code class="notranslate">cs_gr aph_components</code> is deprecated!<br>
In the future, use csgraph.connected_components. Note that this new function has<br>
a slightly different interface: see the docstring for more information.<br>
warnings.warn(depdoc, DeprecationWarning)<br>
.C:\Python27\lib\site-packages\numpy\lib\utils.py:139: DeprecationWarning: <code class="notranslate">cs_g raph_components</code> is deprecated!<br>
In the future, use csgraph.connected_components. Note that this new function has<br>
a slightly different interface: see the docstring for more information.<br>
warnings.warn(depdoc, DeprecationWarning)<br>
C:\Python27\lib\site-packages\numpy\lib\utils.py:139: DeprecationWarning: <code class="notranslate">cs_gr aph_components</code> is deprecated!<br>
In the future, use csgraph.connected_components. Note that this new function has<br>
a slightly different interface: see the docstring for more information.<br>
warnings.warn(depdoc, DeprecationWarning)<br>
........................................................................C:\Pytho<br>
n27\lib\site-packages\sklearn\feature_selection\univariate_selection.py:109: Run<br>
timeWarning: invalid value encountered in divide<br>
f = msb / msw<br>
.......................F...............S...................C:\Python27\lib\site-<br>
packages\sklearn\linear_model\least_angle.py:233: UserWarning: Regressors in act<br>
ive set degenerate. Dropping a regressor, after 2 iterations, i.e. alpha=6.870e-<br>
02, with an active set of 2 regressors, and the smallest cholesky pivot element<br>
being 2.220e-16<br>
% (n_iter, alpha, n_active, diag))<br>
...---<br>
................................................................................<br>
...............................................................C:\Python27\lib\s<br>
ite-packages\nose\util.py:14: DeprecationWarning: The compiler package is deprec<br>
ated and removed in Python 3.x.<br>
from compiler.consts import CO_GENERATOR<br>
C:\Python27\lib\site-packages\nose\util.py:14: DeprecationWarning: The compiler<br>
package is deprecated and removed in Python 3.x.<br>
from compiler.consts import CO_GENERATOR<br>
...........................C:\Python27\lib\site-packages\sklearn\linear_model\te<br>
sts\test_sparse_coordinate_descent.py:104: UserWarning: With alpha=0, this algor<br>
ithm does not converge well. You are advised to use the LinearRegression estimat<br>
or<br>
clf.fit(X, Y)<br>
....C:\Python27\lib\site-packages\sklearn\linear_model\coordinate_descent.py:666<br>
: UserWarning: precompute is ignored for sparse data<br>
warnings.warn("precompute is ignored for sparse data")<br>
C:\Python27\lib\site-packages\sklearn\linear_model\coordinate_descent.py:288: Us<br>
erWarning: Objective did not converge for target 0, you might want to increase t<br>
he number of iterations<br>
' to increase the number of iterations')<br>
....................C:\Python27\lib\site-packages\numpy\core_methods.py:57: Run<br>
timeWarning: invalid value encountered in double_scalars<br>
ret = ret / float(rcount)<br>
............................................................................C:\P<br>
ython27\lib\site-packages\sklearn\utils\extmath.py:244: RuntimeWarning: underflo<br>
w encountered in exp<br>
out = np.log(np.sum(np.exp(arr - vmax), axis=0))<br>
C:\Python27\lib\site-packages\sklearn\mixture\dpgmm.py:42: RuntimeWarning: under<br>
flow encountered in exp<br>
v = np.exp(v - out)<br>
..........................................C:\Python27\lib\site-packages\sklearn<br>
mixture\gmm.py:307: RuntimeWarning: underflow encountered in exp<br>
responsibilities = np.exp(lpr - logprob[:, np.newaxis])<br>
..................................................F.......C:\Python27\lib\site-p<br>
ackages\sklearn\utils__init__.py:71: DeprecationWarning: Class NuSVC is depreca<br>
ted; to be removed in v0.14;<br>
use sklearn.svm.NuSVC instead<br>
warnings.warn(msg, category=DeprecationWarning)<br>
.C:\Python27\lib\site-packages\sklearn\utils__init__.py:71: DeprecationWarning:<br>
Class NuSVR is deprecated; to be removed in v0.14;<br>
use sklearn.svm.NuSVR instead<br>
warnings.warn(msg, category=DeprecationWarning)<br>
.C:\Python27\lib\site-packages\sklearn\utils__init__.py:71: DeprecationWarning:<br>
Class SVC is deprecated; to be removed in v0.14;<br>
use sklearn.svm.SVC instead<br>
warnings.warn(msg, category=DeprecationWarning)<br>
.C:\Python27\lib\site-packages\sklearn\utils__init__.py:71: DeprecationWarning:<br>
Class SVR is deprecated; to be removed in v0.14;<br>
use sklearn.svm.SVR instead<br>
warnings.warn(msg, category=DeprecationWarning)<br>
.......................................<br>
C:\Windows\system32&gt;nosetests sklearn --exe<br>
................................................................................<br>
.............................................................C:\Python27\lib\sit<br>
e-packages\sklearn\manifold\spectral_embedding.py:225: UserWarning: Graph is not<br>
fully connected, spectral embedding may not works as expected.<br>
warnings.warn("Graph is not fully connected, spectral embedding"<br>
......C:\Python27\lib\site-packages\sklearn\manifold\spectral_embedding.py:225:<br>
UserWarning: Graph is not fully connected, spectral embedding may not works as e<br>
xpected.<br>
warnings.warn("Graph is not fully connected, spectral embedding"<br>
......................S........S.................S......S.......................<br>
................................................................................<br>
S.........S.....................................................................<br>
......................................S....S....................................<br>
.........................................SSS........................C:\Python27<br>
lib\site-packages\sklearn\externals\joblib\test\test_func_inspect.py:122: UserWa<br>
rning: Cannot inspect object &lt;functools.partial object at 0x04A099C0&gt;, ignore li<br>
st will not work.<br>
nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),<br>
....................................S.SS........................................<br>
................................................................................<br>
.......................C:\Python27\lib\site-packages\sklearn\externals\joblib\te<br>
st\test_func_inspect.py:122: UserWarning: Cannot inspect object &lt;functools.parti<br>
al object at 0x04A099C0&gt;, ignore list will not work.<br>
nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
...........S..............S.....................................................<br>
................................................................................<br>
.........................................................................S...S..<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
..................................................................FF............<br>
................................................................................<br>
....................................................C:\Python27\lib\site-package<br>
s\sklearn\manifold\spectral_embedding.py:225: UserWarning: Graph is not fully co<br>
nnected, spectral embedding may not works as expected.<br>
warnings.warn("Graph is not fully connected, spectral embedding"<br>
................C:\Python27\lib\site-packages\sklearn\manifold\spectral_embeddin<br>
g.py:225: UserWarning: Graph is not fully connected, spectral embedding may not<br>
works as expected.<br>
warnings.warn("Graph is not fully connected, spectral embedding"<br>
...............S...............S.S................S.............................<br>
.......................................................................S........<br>
.....................S..........................................................<br>
............................S...........S.......................................<br>
..........................SSS......................C:\Python27\lib\site-packages<br>
\sklearn\externals\joblib\test\test_func_inspect.py:122: UserWarning: Cannot ins<br>
pect object &lt;functools.partial object at 0x04A099C0&gt;, ignore list will not work.</p>
<p dir="auto">nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
................................................................................<br>
.........................................................SSS....................<br>
.....C:\Python27\lib\site-packages\sklearn\externals\joblib\test\test_func_inspe<br>
ct.py:122: UserWarning: Cannot inspect object &lt;functools.partial object at 0x04A<br>
099C0&gt;, ignore list will not work.</p>
<h1 dir="auto"></h1>
<h2 dir="auto">FAIL: Test the sparse LinearSVC with the iris dataset</h2>
<p dir="auto">Traceback (most recent call last):<br>
File "C:\Python27\lib\site-packages\nose\case.py", line 197, in runTest<br>
self.test(*self.arg)<br>
File "C:\Python27\lib\site-packages\sklearn\svm\tests\test_sparse.py", line 17<br>
3, in test_linearsvc_iris<br>
clf.predict(iris.data.todense()), sp_clf.predict(iris.data))<br>
File "C:\Python27\lib\site-packages\numpy\testing\utils.py", line 812, in asse<br>
rt_array_almost_equal<br>
header=('Arrays are not almost equal to %d decimals' % decimal))<br>
File "C:\Python27\lib\site-packages\numpy\testing\utils.py", line 645, in asse<br>
rt_array_compare<br>
raise AssertionError(msg)<br>
AssertionError:<br>
Arrays are not almost equal to 6 decimals</p>
<p dir="auto">(mismatch 0.666666666667%)<br>
x: array([2, 1, 0, 2, 0, 2, 0, 1, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 0, 0, 2, 1, 0,<br>
0, 2, 0, 0, 1, 1, 0, 2, 2, 0, 2, 2, 1, 0, 2, 1, 1, 2, 0, 2, 0, 0, 1,<br>
2, 2, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 0, 2, 1, 1, 1, 1, 2, 0,...<br>
y: array([2, 1, 0, 2, 0, 2, 0, 1, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 0, 0, 2, 1, 0,<br>
0, 2, 0, 0, 1, 1, 0, 2, 2, 0, 2, 2, 1, 0, 2, 1, 1, 2, 0, 2, 0, 0, 1,<br>
2, 2, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 0, 2, 1, 1, 1, 1, 2, 0,...</p>
<hr>
<p dir="auto">Ran 1603 tests in 92.776s</p>
<p dir="auto">FAILED (SKIP=14, failures=1)<br>
.........................S.................S....................................<br>
.....C:\Python27\lib\site-packages\sklearn\manifold\spectral_embedding.py:225: U<br>
serWarning: Graph is not fully connected, spectral embedding may not works as ex<br>
pected.<br>
warnings.warn("Graph is not fully connected, spectral embedding"<br>
............................................................S...........S.......<br>
.................S.............................................S................<br>
....................................................S...........................<br>
...........................SSS......................C:\Python27\lib\site-package<br>
s\sklearn\externals\joblib\test\test_func_inspect.py:122: UserWarning: Cannot in<br>
spect object &lt;functools.partial object at 0x049F99C0&gt;, ignore list will not work<br>
.</p>