-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: No module named learn.base #105
Comments
I had the same problem, but I fixed it after installing scikits-learn on Ubuntu according to instructions from http://scikit-learn.org/stable/install.html, I had to change the import from: from scikits.learn.base import BaseEstimator to: from sklearn.base import BaseEstimator |
I am facing the same problem on windows. Somebody help me please. |
@IIUJ-JoannaMisztal is right about this. This project is toooooo old, back then scikit-learn was called scikits.learn. So you need to update the code and recompile it yourself. |
I have installed the canopy python distribution and the program started working! |
According to Installing Crab, you should install scikits.learn. However, from scikit-learn_doc
so maybe the author should update the source code! |
Hello, |
So... anyone has an experience what i really needs to refactor for newest version of scikits to work properly? Or i should use the old one? I know project is old, but my tutor adviced it for my, to do simply recomendation system module and now it is not funny -.- |
|
Changed import line muricoca#105
Changed import library muricoca#105
Hi, I’ve changed “scikits.learn.base” to “sklearn.base” both And I still got problem with Is there anything I did wrong? |
I have made following change in the source code: #from scikits.learn.base import BaseEstimator then reinstall crab using the following command in crab directory python setup.py install Now, it seems to be more health. |
I find it can clone the source code and install by source code. It will be ok. |
This did the trick for me: |
hi,I start to learn to study the crab using python ,but I come across some problems, my example's code is
author = 'Cookie'
from scikits.crab import datasets
movies = datasets.load_sample_movies()
songs = datasets.load_sample_songs()
print(movies.data)
print(songs)
from scikits.crab.models import MatrixPreferenceDataModel
#Build the model
model = MatrixPreferenceDataModel(movies.data)
from scikits.crab.metrics import pearson_correlation
from scikits.crab.similarities import UserSimilarity
Build the similarity
similarity = UserSimilarity(model, pearson_correlation)
from scikits.crab.recommenders.knn import UserBasedRecommender
problems:
Traceback (most recent call last):
File "D:/Rail/jx/Python/project1/Crab.py", line 16, in
from scikits.crab.recommenders.knn import UserBasedRecommender
File "D:\Program Files (x86)\Python27\lib\site-packages\scikits\crab\recommenders\knn__init__.py", line 1, in
from .classes import ItemBasedRecommender, UserBasedRecommender
File "D:\Program Files (x86)\Python27\lib\site-packages\scikits\crab\recommenders\knn\classes.py", line 17, in
from base import ItemRecommender, UserRecommender
File "D:\Program Files (x86)\Python27\lib\site-packages\scikits\crab\recommenders\knn\base.py", line 17, in
from ..base import MemoryBasedRecommender
File "D:\Program Files (x86)\Python27\lib\site-packages\scikits\crab\recommenders\base.py", line 17, in
from ..base import BaseRecommender
File "D:\Program Files (x86)\Python27\lib\site-packages\scikits\crab\base.py", line 11, in
from scikits.learn.base import BaseEstimator
ImportError: No module named learn.base
I had installed the packages:Python 2.7.9, numpy-MKL-1.8.0.win-amd64-py2.7,scipy-0.15.1-cp27-none-win_amd64,matplotlib-1.4.3.win-amd64-py2.7,scikit-learn-0.16.1.win-amd64-py2.7,thank you very much.
The text was updated successfully, but these errors were encountered: