albahnsen / CostSensitiveClassification

CostSensitiveClassification Library in Python
BSD 3-Clause "New" or "Revised" License
207 stars 83 forks source link

costcla.model is not working with latest version of sklearn #15

Closed arjunpuri7 closed 4 years ago

arjunpuri7 commented 5 years ago

sir, I want to use costcla library on my datasets as I am importing from costcla import models I am facing error that no module of sklearn.cross_validation. As it present in sklearn.model_selection. please help me to uses this package on my datasets

anilkumarpanda commented 5 years ago

The code repository has been updated to work with sklearn.model_selection but it has not been pushed to pypi . To use the code : 1) Clone the repository to your local environment . 2) cd CostSensitiveClassification 3) 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 .

hnslyh commented 4 years ago

You need to change the sentense in Anaconda3\Lib\site-packages\costcla-0.5-py3.7.egg\costcla\models, open cost_ensemble.py. Then change [from sklearn.cross_validation import train_test_split] to [sklearn.model_selection import train_test_split]

albahnsen commented 4 years ago

Done. Sorry for the delay