TypeError:float()参数必须是字符串或数字,而不是'map'

时间:2017-05-19 00:15:50

标签: python-2.7 python-3.x numpy machine-learning scikit-learn

我正在从GitHub(https://github.com/tyleryasaka/weatherman)运行一个简单的程序。

它给了我这个错误:

Traceback (most recent call last):
      File "C:/Users/Humxa/Desktop/weatherman-master/weatherman.py", line 39, in <module>
        actual = learn.predict(classifier, trainings, tests)
      File "C:\Users\Humxa\Desktop\weatherman-master\learn.py", line 11, in predict
        fit = classifier.fit(data, target)
      File "C:\Python34\lib\site-packages\sklearn\tree\tree.py", line 739, in fit
        X_idx_sorted=X_idx_sorted)
      File "C:\Python34\lib\site-packages\sklearn\tree\tree.py", line 122, in fit
        X = check_array(X, dtype=DTYPE, accept_sparse="csc")
      File "C:\Python34\lib\site-packages\sklearn\utils\validation.py", line 382, in check_array
        array = np.array(array, dtype=dtype, order=order, copy=copy)
    TypeError: float() argument must be a string or a number, not 'map'

0 个答案:

没有答案