Download the PHP package phpjuice/opencf without Composer
On this page you can find all versions of the php package phpjuice/opencf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phpjuice/opencf
More information about phpjuice/opencf
Files in phpjuice/opencf
Package opencf
Short Description PHP implementation of the (Weighted Slopeone,Cosine, Weighted Cosine) rating-based collaborative filtering schemes.
License MIT
Informations about the package opencf
OpenCF
PHP implementation of the (Weighted Slopeone,Cosine, Weighted Cosine) rating-based collaborative filtering schemes.
To learn all about it, head over to the extensive documentation.
Installation
OpenCF Package requires PHP 7.4
or higher.
INFO: If you are using an older version of php this package will not function correctly.
The supported way of installing OpenCF
package is via Composer.
Usage
OpenCF Package is designed to be very simple and straightforward to use. All you have to do is:
- Load a training set (dataset)
- Predict future ratings using a recommender. (Weighted Slopeone,Cosine, Weighted Cosine)
Create Recommender Service
The OpenCF
recommender service is created by direct instantiation:
Adding dataset
Adding a dataset to the recommender can be done using the constructor or can be easily done by providing an array of
users ratings via the setDataset()
method:
Getting Predictions
All you have to do to predict ratings for a new user is to retrieve an engine from the recommender service and & run
the predict()
method.
This should produce the following results when using WeightedSlopeone
recommender
Running the tests
you can easily run tests using composer
Built With
- PHP - The programing language used
- Composer - Dependency Management
- Pest - An elegant PHP Testing Framework
Changelog
Please see the changelog for more information on what has changed recently.
Contributing
Please see CONTRIBUTING.md for details and a todo list.
Security
If you discover any security related issues, please email author instead of using the issue tracker.
Credits
- Daniel Lemire
- SlopeOne Predictors for Online Rating-Based Collaborative Filtering
- Distance Weighted Cosine Similarity
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
License
license. Please see the Licence for more information.