benfred / implicit

Fast Python Collaborative Filtering for Implicit Feedback Datasets
https://benfred.github.io/implicit/
MIT License
3.55k stars 611 forks source link

cython_lapack.posv error #153

Closed tosolveit closed 6 years ago

tosolveit commented 6 years ago

Hi, I have python 2.7.13 with the following packages:

When I want to fit a model with some parameters I get this error:

Traceback (most recent call last): File "code/optimize.py", line 185, in regularization=0.4) File "code/optimize.py", line 75, in calculate_recommendations model.fit(plays) File "/Users/ilker/anaconda/lib/python2.7/site-packages/implicit/approximate_als.py", line 211, in fit super(AnnoyAlternatingLeastSquares, self).fit(Ciu) File "/Users/ilker/anaconda/lib/python2.7/site-packages/implicit/als.py", line 164, in fit num_threads=self.num_threads) File "implicit/_als.pyx", line 55, in implicit._als.least_squares File "implicit/_als.pyx", line 119, in implicit._als._least_squares ValueError: cython_lapack.posv failed (err=1) on row 3. Try increasing the regularization parameter.

In the last line of the error output it says that ValueError is at row 3, when I run it different times I get this error for different rows in my data set, instead of using my data I tried using movie-lens 100k and got the similar error, In the source code comment says that it may happen due to missing regularization parameter, I'm sure that I pass the parameter, what might be the other possible problems? How can I solve this problem?

Thanks

benfred commented 6 years ago

Interesting. This works with the movielens 100k dataset for me (running the movielens example included here:python examples/movielens.py --variant 100k ). Do you have source code to reproduce the problem?

tosolveit commented 6 years ago

Hi @benfred , I think It was my mistake, I fixed the error by changing parameters, probably it was related to gpu parameter and that caused the problem, you can close the issue, sorry for taking your time.