我想使用预处理包http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.StandardScaler.html#sklearn.preprocessing.StandardScaler中的StandardScaler类,但我在scikit Learn0.13上不断得到一个AttributeError: 'module' object has no attribute 'StandardScaler'
preprocessing.__dict__不显示StandardScaler。
我可以在同一个包中使用LabelEncoder类。
发布于 2013-02-25 05:11:08
您的sklearn路径中的python包可能是旧版本,而不是您安装的0.13版本。尝试:
python -c "import sklearn; print(sklearn.__file__)"检查这是否是预期的sklearn安装位置。
为了解决重复安装问题,我发现运行以下命令很有用:
pip uninstall scikit-learn几次,直到我收到一条错误消息,明确地告诉我系统上没有安装scikit-learn。然后:
pip install scikit-learn一次安装最新的稳定版本(即撰写本文时的0.13.1 )。
https://stackoverflow.com/questions/15053786
复制相似问题