建议:2008 Mac w/OSX 10.8 host w/Virtualbox guestUbuntu 12.04 设置 python、scikit-learn 和其他 ML 工具



我想得到反馈,了解我需要完成哪些选项或最佳选项。 我有一台较旧的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 顶篷或 http://docs.continuum.io/anaconda/pkgs.html 或 OSX https://github.com/fonnesbeck/ScipySuperpack

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

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

下面是运行鼻测试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   supportnn      blue¢       0.63  [truncated]... != '             precision    recall  f1-score   supportnn      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)
Python

3.2 还不支持写在 github 上项目的 README.rst 文件。请安装 Python 3.3 或暂时坚持使用 Python 2.7。

相关内容

  • 没有找到相关文章

最新更新