Skip to content

Commit

Permalink
Fix issue with last user having no ratings
Browse files Browse the repository at this point in the history
If the last user or item in the interactions matrix passed in had no ratings,
the BPR model was failing to fit with an error like:

```
 File "implicit/bpr.pyx", line 139, in implicit.bpr.BayesianPersonalizedRanking.fit
IndexError: boolean index did not match indexed array along dimension 0; dimension is 43060797 but corresponding boolean dimension is 43060796
```

Fix by passing the appropiate dimension to bincount.
  • Loading branch information
benfred committed Mar 15, 2018
1 parent a9915fa commit 1cb420a
Show file tree
Hide file tree
Showing 5 changed files with 1,138 additions and 1,165 deletions.
2 changes: 1 addition & 1 deletion implicit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
from . import nearest_neighbours
from . import als

__version__ = '0.2.7'
__version__ = '0.3.3'

__all__ = [alternating_least_squares, als, nearest_neighbours, __version__]
Loading

0 comments on commit 1cb420a

Please sign in to comment.