沒有StandardScaler類我想用StandardScaler
類預處理包http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.StandardScaler.html#sklearn.preprocessing.StandardScaler,但我不斷收到上AttributeError: 'module' object has no attribute 'StandardScaler'
scikit學習0.13在sklearn.preprocessing
preprocessing.__dict__
不顯示StandardScaler
。
我可以在同一個包中使用LabelEncoder
類。
'print sklearn .__ file__' outputs /Library/Python/2.7/site-packages/scikit_learn-0.13_git-py2.7-macosx-10.8-intel.egg/sklearn/__init__.pyc – user1733029 2013-02-25 02:45:28
奇怪的是,我只是試着用與蟒蛇CE附帶sklearn 0.13的二進制版本,我沒有得到問題: >>> import sklearn >>> sklearn .__ file__ '/Users/ogrisel/anaconda/lib/python2.7/site -packages/sklearn/__初始化__。PYC」 >>> sklearn .__ version__ '0.13' >>>從sklearn.preprocessing進口StandardScaler >>> StandardScaler() StandardScaler(拷貝=真,with_mean =真,with_std =真正) – ogrisel 2013-03-15 20:44:20