新手从GitHub上扒了一个CostSensitiveClassification的包,import时反复报错
No module named 'sklearn.cross_validation'
于是看GitHub上,大佬给出的解释是
The code repository has been updated to work with sklearn.model_selection but it has not been pushed to pypi . To use the code :
Clone the repository to your local environment .
cd CostSensitiveClassification
pip install .
You should be able to use the latest version of the code . A few minor changes may be required to make to tutorial notebook work .
意思是下下来,安装好,但是下下来cd得时候发现问题了,就是cd路径后要加上/d 再跟路径才行
最后 打开 from costcla.models import CostSensitiveDecisionTreeClassifier时,老是报错
就需要在lib里把一个文件里的sklearn.cross_validation改了就好