benfred / implicit

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

Add an `alpha` parameter for the ALS models #581

Closed benfred closed 2 years ago

benfred commented 2 years ago

This adds an alpha parameter to the ALS models - which is the weight each positive example is multiplied by. While we could previously achieve the same result before by passsing a sparse matrix to model.fit where the weight was already multiplied in, having as an explicit parameter makes it easier to work with hyper parameter tuning frameworks - letting you treat the same as things like regularization/epochs etc