muricoca / crab

Crab is a flexible, fast recommender engine for Python that integrates classic information filtering recommendation algorithms in the world of scientific Python packages (numpy, scipy, matplotlib).
http://muricoca.github.com/crab
Other
1.18k stars 376 forks source link

why is crab's UserBasedRecommender so slow? #85

Open lognorder opened 11 years ago

lognorder commented 11 years ago

the benchmark for crab is (http://www.slideshare.net/marcelcaraciolo/crab-a-python-framework-for-building-recommender-systems page-37)

Benchmarks Pure Python w/ Python w/ Scipy Dataset dicts and NumpyMovieLens 100k 15.32 s 9.56 s http://www.grouplens.org/node/73 Old Crab New Crab

however, in my case, I need to take more than 30 minutes to do it, I don't know the reason

my code is

model = MatrixPreferenceDataModel(recommend_data.data) similarity = UserSimilarity(model, pearson_correlation) recommender = UserBasedRecommender(model, similarity, with_preference=True) recommender.recommend("6")

my data is NumpyMovieLens 100k, which contains 100,000 ratings from 1000 users on 1700 movies.

onestarshang commented 9 years ago

my code is very slow too, it is a problem my training data: 4701 users, 2721 movies

soufiane-fadil commented 8 years ago

Yes it is slow , maybe should we build it in the background and save the trained data into an indexer to retrieve them easily later on.

Maybe there is another solution , or did you find anything usefull ?

sam-choi commented 7 years ago

I have same problem! crab recommendation is very slow. In my case, it takes 3hours for recommender.recommend(1) by using movelens100k. What is the problem??? My system is python 2.7 and crab in ubuntu. How can I reduce the recommedation time?

soufiane-fadil commented 7 years ago

I guess the project is dead! any alternative please ?

mayukh18 commented 7 years ago

3 hours for recommending on the movielens100k dataset is hard to imagine. If you are looking for basic SVD approaches, you can check the code for the SVD recommender in reco. It takes 15-25 seconds as I have tested.

Garima1293 commented 6 years ago

recommender = UserBasedRecommender(model, similarity, with_preference=True) recommender.recommend(5) After running these lines am getting output as : array([], dtype=float64) what's wrong here. even I copied whole code from http://muricoca.github.io/crab/tutorial.html