-4

我想就我需要完成的任务提供哪些选项或最佳选项的反馈。我有一台较旧的 Macbook pro 2008、8GB RAM、10.8 Mountain Lion。我安装了 Virtualbox 并安装了 Ubuntu 12.04 VM。安装 Ubuntu 的原因是能够运行一些我需要的 perl 脚本来收集数据并将它们放入 MongoDB(我无法在 OSX 中执行此操作)

从 MongoDB 中,我将数据提取为可以输入到开源机器学习库中的格式。我想从 scikit-learn 开始。其他可能是 WEKA 和小型 Hadoop(因为 Hadoop 也是我想开始学习使用的东西,所以我会用一块石头杀死两只鸟)。甚至可能是图形实验室...

数据量不是很大,Mongo之前的原始形式,现在大约3-4GB。

因为我有 Ubuntu VM,所以我决定用它来运行 scikit learn。我在 Ubuntu 上安装了 python3,然后是 numpy、scipy、matplotlib,然后是 scikitlearn。当我运行鼻子测试时,我收到错误并失败。

我已经阅读了各种选项,但不确定最好的方法是什么。我是否使用 Ubuntu 或 OSX 上的预打包工具之一来运行 scikit learn 和 python3?例如:EPD Entought Canopy 或http://docs.continuum.io/anaconda/pkgs.html或 OSX https://github.com/fonnesbeck/ScipySuperpack

我是否忘记了python3并使用python 2.7并从源代码安装所有内容..?哪个,Ubuntu 或 OSX,将是使用 scikit learn 和其他流行的免费机器学习库/工具的最佳选择?

提前感谢您的帮助和时间。

下面是运行nosetests sklearn --exe的输出它是输出的尾端。由于字符限制和错误,第一部分主要有警告..

./usr/local/lib/python3.2/dist-packages/sklearn/datasets/tests/test_base.py:155: UserWarning: Could not load sample images, PIL is not available.
/usr/local/lib/python3.2/dist-packages/sklearn/decomposition/fastica_.py:271: UserWarning: Ignoring n_components with whiten=False.
./usr/local/lib/python3.2/dist-packages/sklearn/utils/__init__.py:75: DeprecationWarning: Class ProbabilisticPCA is deprecated; ProbabilisticPCA will be removed in 0.16. WARNING: the covariance estimation was previously incorrect, your output might be different  than under the previous versions. Use PCA that implements score and score_samples. To work with homoscedastic=False, you should use FactorAnalysis.

/usr/local/lib/python3.2/dist-packages/sklearn/externals/joblib/test/test_func_inspect.py:122: UserWarning: Cannot inspect object functools.partial(<function f at 0xba47dec>, 1), ignore list will not work.
  nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),
======================================================================
ERROR: Failure: SyntaxError (invalid syntax (test_text.py, line 561))
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/failure.py", line 38, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/loader.py", line 413, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.metrics.tests.test_metrics.test_classification_report_multiclass_with_string_label
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/metrics/tests/test_metrics.py", line 822, in test_classification_report_multiclass_with_string_label
    report = classification_report(y_true, y_pred)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/metrics/metrics.py", line 1828, in classification_report
    average=None)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/metrics/metrics.py", line 1550, in precision_recall_fscore_support
    'precision', 'predicted', average)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/metrics/metrics.py", line 1331, in _prf_divide
    result = numerator / denominator
ValueError: operands could not be broadcast together with shapes (3) (4) 

======================================================================
ERROR: Failure: SyntaxError (invalid syntax (test_multiclass.py, line 53))
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/failure.py", line 38, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/loader.py", line 413, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/tests/test_multiclass.py", line 53
    np.array([u'a', u'b', u'c']),
                 ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_all_estimators
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 58, in test_all_estimators
    estimators = all_estimators(include_meta_estimators=True)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_all_estimator_no_base_class
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 117, in test_all_estimator_no_base_class
    for name, Estimator in all_estimators():
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_estimators_sparse_data
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 131, in test_estimators_sparse_data
    estimators = all_estimators()
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_transformers_sparse_data
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 258, in test_transformers_sparse_data
    estimators = all_estimators(type_filter='transformer')
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_estimators_nan_inf
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 301, in test_estimators_nan_inf
    estimators = all_estimators()
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_transformers_pickle
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 392, in test_transformers_pickle
    transformers = all_estimators(type_filter='transformer')
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_classifiers_one_label
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 457, in test_classifiers_one_label
    classifiers = all_estimators(type_filter='classifier')
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_clustering
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 492, in test_clustering
    clustering = all_estimators(type_filter='cluster')
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_classifiers_train
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 530, in test_classifiers_train
    classifiers = all_estimators(type_filter='classifier')
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_classifiers_classes
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 605, in test_classifiers_classes
    classifiers = all_estimators(type_filter='classifier')
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_classifiers_input_shapes
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 650, in test_classifiers_input_shapes
    classifiers = all_estimators(type_filter='classifier')
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_classifiers_pickle
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 691, in test_classifiers_pickle
    classifiers = all_estimators(type_filter='classifier')
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_regressors_int
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 749, in test_regressors_int
    regressors = all_estimators(type_filter='regressor')
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_regressors_train
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 780, in test_regressors_train
    regressors = all_estimators(type_filter='regressor')
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_regressor_pickle
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 823, in test_regressor_pickle
    regressors = all_estimators(type_filter='regressor')
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_class_weight_classifiers
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 889, in test_class_weight_classifiers
    classifiers = all_estimators(type_filter='classifier')
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_class_weight_auto_classifies
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 926, in test_class_weight_auto_classifies
    classifiers = all_estimators(type_filter='classifier')
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_estimators_overwrite_params
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 974, in test_estimators_overwrite_params
    estimators = all_estimators(type_filter=est_type)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
ERROR: sklearn.tests.test_common.test_cluster_overwrite_params
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/tests/test_common.py", line 1018, in test_cluster_overwrite_params
    clusterers = all_estimators(type_filter="cluster")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/utils/testing.py", line 300, in all_estimators
    module = __import__(modname, fromlist="dummy")
  File "/usr/local/lib/python3.2/dist-packages/sklearn/feature_extraction/tests/test_text.py", line 561
    expected_stop_words = set([u'celeri', u'tomato', u'copyright', u'coke',
                                       ^
SyntaxError: invalid syntax

======================================================================
FAIL: Test confusion matrix - binary classification case
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/metrics/tests/test_metrics.py", line 630, in test_confusion_matrix_binary
    [str(y) for y in y_pred])
  File "/usr/local/lib/python3.2/dist-packages/sklearn/metrics/tests/test_metrics.py", line 625, in test
    assert_array_almost_equal(mcc, true_mcc, decimal=2)
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 800, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 636, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 2 decimals

(mismatch 100.0%)
 x: array(0.6011393316693135)
 y: array(0.5715476066494083)

======================================================================
FAIL: sklearn.metrics.tests.test_metrics.test_classification_report_multiclass_with_unicode_label
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/metrics/tests/test_metrics.py", line 856, in test_classification_report_multiclass_with_unicode_label
    assert_equal(report, expected_report)
AssertionError: '             precision    recall  f1-score   support\n\n      blue¢       0.63  [truncated]... != '             precision    recall  f1-score   support\n\n      blue¢       0.83  [truncated]...
               precision    recall  f1-score   support

-       blue¢       0.63      0.33      0.44        36
-      green¢       0.17      0.17      0.17         6
+       blue¢       0.83      0.79      0.81        24
+      green¢       0.33      0.10      0.15        31
         red¢       0.42      0.90      0.57        20

- avg / total       0.52      0.50      0.45        62
?                      ^         ^          ----------
+ avg / total       0.51      0.53      0.47        75
?                      ^         ^         ++++++++++


======================================================================
FAIL: Ensure that classification metrics with string labels
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/nose-1.3.0-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python3.2/dist-packages/sklearn/metrics/tests/test_metrics.py", line 1177, in test_invariance_string_vs_numbers_labels
    "test".format(name))
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 707, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 636, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal
precision_score failed string vs number invariance test
(mismatch 100.0%)
 x: array(0.85)
 y: array(0.6666666666666666)

----------------------------------------------------------------------
Ran 1714 tests in 129.977s

FAILED (SKIP=16, errors=23, failures=3)
4

1 回答 1

0

github 上项目的README.rst文件中不支持 Python 3.2(还没有?) 。请暂时安装 Python 3.3 或坚持使用 Python 2.7。

于 2013-10-14T16:28:18.597 回答