On Sat, Sep 11, 2010 at 12:54 AM, Gael Varoquaux
Post by Gael VaroquauxI believe that the problem is that Keith has other scikits installed that
define other namespace packages. Nosetest clearly doesn't handle
namespace package, I have had the problem too. I can't blame nosetests
for that, I believe that namespace packages are really an ugly hack.
Unfortunately, they are a standard in the Python world, and nosetests
should fix their code.
I don't understand any of this but here's what I did. I removed
statsmodels and learn, the only scikits on my computer. Then
$ git clone http://github.com/scikit-learn/scikit-learn.git
$ cd scikit-learn
$ make
which gives:
Ran 523 tests in 28.703s
FAILED (SKIP=1, failures=3)
make: *** [test] Error 1
I then ran (are the failures know?) nosetests --with-doctest (see below)
Next I installed learn and statsmodels and added my
scikits.learn.test() code to learn's __init__.py. That ran 0 tests. I
then replaced my code with the .test() code from statemodels 0.2; it
ran 489 tests:
Ran 489 tests in 13.167s
FAILED (SKIP=1, failures=2)
<nose.result.TextTestResult run=489 errors=0 failures=2>
---
$ nosetests --with-doctest
.../ba/devel/scikit-learn/scikits/learn/cluster/spectral.py:52:
UserWarning: pyamg not available, using scipy.sparse
warnings.warn('pyamg not available, using scipy.sparse')
..../ba/devel/scikit-learn/scikits/learn/cross_val.py:515:
UserWarning: split is deprecated and will be removed, please use
indexing instead
warnings.warn('split is deprecated and will be removed, '
...../usr/local/lib/python2.6/site-packages/numpy/lib/utils.py:140:
DeprecationWarning: `unique1d` is deprecated!
warnings.warn(depdoc, DeprecationWarning)
.............................................................................................................................................................................................................................................................................................................F.............................................................F.........F....................................................................../usr/local/lib/python2.6/site-packages/scipy/cluster/vq.py:570:
UserWarning: One of the clusters is empty. Re-run kmean with a
different initialization.
warnings.warn("One of the clusters is empty. "
.................................S.................................
======================================================================
FAIL: Test BayesianRidge on diabetes
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/nose/case.py", line 183, in runTest
self.test(*self.arg)
File "/ba/devel/scikit-learn/scikits/learn/glm/tests/test_bayes.py",
line 27, in XFailed_test_bayesian_on_diabetes
assert_array_equal(np.diff(clf.all_score_) > 0, True)
File "/usr/local/lib/python2.6/site-packages/numpy/testing/utils.py",
line 677, in assert_array_equal
verbose=verbose, header='Arrays are not equal')
File "/usr/local/lib/python2.6/site-packages/numpy/testing/utils.py",
line 609, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not equal
(mismatch 66.6666666667%)
x: array([False, True, True, True, False, False, False, False,
False], dtype=bool)
y: array(True, dtype=bool)
Post by Gael Varoquauxraise AssertionError('\nArrays are not equal\n\n(mismatch 66.6666666667%)\n x: array([False, True, True, True, False, False, False, False, False], dtype=bool)\n y: array(True, dtype=bool)')
-------------------- >> begin captured stdout << ---------------------
Convergence after 9 iterations
--------------------- >> end captured stdout << ----------------------
======================================================================
FAIL: test_train (scikits.learn.tests.test_gmm.TestGMMWithFullCovars)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/ba/devel/scikit-learn/scikits/learn/tests/test_gmm.py", line
384, in test_train
self.assertTrue(post_testll >= init_testll)
AssertionError:
"""Fail the test unless the expression is true."""
Post by Gael Varoquauxif not False: raise self.failureException, None
======================================================================
FAIL: test_train (scikits.learn.tests.test_gmm.TestGMMWithTiedCovars)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/ba/devel/scikit-learn/scikits/learn/tests/test_gmm.py", line
380, in test_train
self.assertTrue(np.all(np.diff(trainll) > -0.5))
AssertionError:
"""Fail the test unless the expression is true."""
Post by Gael Varoquauxif not False: raise self.failureException, None
Name Stmts Exec
Cover Missing
------------------------------------------------------------------------------------
scikits.learn 14 14 100%
scikits.learn.ann 0 0 100%
scikits.learn.ann.mlp 76 14
18% 25-48, 54-57, 63, 76-92, 97-98, 111, 121, 126-143, 146
scikits.learn.ann.rbf 68 15
22% 25-27, 33-34, 40, 51-69, 75-76, 85-98, 108, 113-130, 134
scikits.learn.ann.srn 85 14
16% 25-55, 61-65, 71, 85-113, 118-119, 129, 139, 145-164, 167
scikits.learn.base 73 70
95% 26, 103-105
scikits.learn.cluster 4 4 100%
scikits.learn.cluster.affinity_propagation_ 74 68
91% 57, 60, 123, 144-146
scikits.learn.cluster.k_means_ 86 74
86% 46-47, 130-134, 142-145, 155, 158, 197
scikits.learn.cluster.mean_shift_ 75 56
74% 29-43, 57-61, 97
scikits.learn.cluster.spectral 56 45
80% 15, 81-94
scikits.learn.covariance 2 2 100%
scikits.learn.covariance.covariance 41 39
95% 45, 91
scikits.learn.covariance.ledoit_wolf 27 23
85% 46-48, 61
scikits.learn.cross_val 156 154
98% 455, 491
scikits.learn.datasets 2 2 100%
scikits.learn.datasets.base 33 26
78% 91-99
scikits.learn.datasets.mlcomp 63 8
12% 14-42, 90-137
scikits.learn.datasets.samples_generator 38 30
78% 14, 133-136, 161-164
scikits.learn.externals 0 0 100%
scikits.learn.externals.joblib 6 6 100%
scikits.learn.externals.joblib.format_stack 223 176
78% 44, 49, 57, 61-64, 125-127, 138, 140, 160-165, 186-190, 198,
201, 208-217, 239-240, 274-275, 291, 314, 336-337, 355-357, 364-365,
369-383, 412, 419
scikits.learn.externals.joblib.func_inspect 102 81
79% 73-77, 82-90, 111-113, 143, 148, 159, 200, 204, 218
scikits.learn.externals.joblib.hashing 37 34
91% 64-68, 104
scikits.learn.externals.joblib.logger 63 54
85% 23-26, 49, 59, 75, 80, 122-123
scikits.learn.externals.joblib.memory 199 178
89% 19-20, 28-33, 68, 192, 249, 288, 342, 344, 366-368, 393-394,
487, 502, 510
scikits.learn.externals.joblib.numpy_pickle 60 59 98% 101
scikits.learn.externals.joblib.parallel 84 72
85% 14, 18-19, 70-77, 210, 229, 241
scikits.learn.fastica 128 111
86% 194, 217-226, 233-234, 250, 256-258, 277-278, 342
scikits.learn.feature_selection 1 1 100%
scikits.learn.feature_selection.univariate_selection 94 93 98% 161
scikits.learn.features 0 0 100%
scikits.learn.features.image 40 39 97% 97
scikits.learn.features.text 151 128
84% 98, 104, 138, 209, 225-232, 235-238, 279, 313-320, 323-326
scikits.learn.glm 5 5 100%
scikits.learn.glm.base 36 33
91% 79-84
scikits.learn.glm.bayes 112 106
94% 179-186
scikits.learn.glm.benchmarks 0 0 100%
scikits.learn.glm.benchmarks.bench_bayes 17 6
35% 17-32
scikits.learn.glm.benchmarks.bench_glm 36 5
13% 15-60
scikits.learn.glm.benchmarks.bench_lars 11 7
63% 17-20
scikits.learn.glm.coordinate_descent 119 116
97% 103, 166, 228
scikits.learn.glm.lars 172 172 100%
scikits.learn.glm.ridge 18 18 100%
scikits.learn.gmm 256 230
89% 289, 292-295, 580, 586, 592, 600, 614, 639-651, 655, 659-663,
680, 682
scikits.learn.grid_search 71 53
74% 18-24, 71-72, 183, 205-216
scikits.learn.hmm 394 386
97% 237-238, 343, 477, 480, 682, 733-734
scikits.learn.lda 90 68
75% 71, 94, 101, 108, 115, 124, 126-127, 143, 147, 163, 176-183,
241-246
scikits.learn.logistic 10 8
80% 65-66
scikits.learn.metrics 53 53 100%
scikits.learn.naive_bayes 33 33 100%
scikits.learn.neighbors 25 25 100%
scikits.learn.pca 87 83
95% 33, 44-45, 183
scikits.learn.pipeline 37 37 100%
scikits.learn.preprocessing 21 21 100%
scikits.learn.qda 75 63
84% 72, 94, 96, 102, 109, 113, 126, 130, 134, 197-202
scikits.learn.rfe 47 47 100%
scikits.learn.sparse 1 1 100%
scikits.learn.sparse.svm 85 77
90% 181, 201, 221, 239, 244-247
scikits.learn.svm 124 116
93% 180, 267, 332, 336-338, 342, 677
scikits.learn.utils 0 0 100%
scikits.learn.utils._csgraph 21 17
80% 61-62, 65, 70
scikits.learn.utils.bench 3 1
33% 13-15
scikits.learn.utils.extmath 38 19
50% 20, 30-33, 38, 44-47, 53-65, 77-78
scikits.learn.utils.fixes 48 30
62% 15-20, 23-28, 38, 42-47, 73, 81-82
scikits.learn.utils.graph 73 70
95% 47, 64, 70
scikits.learn.utils.sparsetools 1 1 100%
scikits.learn.utils.sparsetools.csgraph 54 27
50% 16-18, 28, 32-33, 35-45, 48, 51-54, 57-59, 64-66
------------------------------------------------------------------------------------
TOTAL 4334 3624 83%
----------------------------------------------------------------------
Ran 523 tests in 31.811s
FAILED (SKIP=1, failures=3)