Zero
Mangaki's recommendation algorithms.
They are tested on Python 3.6, 3.7, 3.8 over OpenBLAS LP64 & MKL.
Install
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Usage
To run cross-validation:
- Download a dataset like Movielens 100k.
- Ensure the columns are named
user,item,rating:
| user | item | rating |
|---|---|---|
| 3 | 5 | 4.5 |
For example, here, user 3 gave 4.5 stars to item 5.
-
Then run:
python compare.py <path/to/dataset>
You can tweak the experiments/default.json file to compare other models.
Custom usage
Most models have the following routines:
from zero.als import MangakiALS
model = MangakiALS(nb_components=10)
model.fit(X, y)
model.predict(X)
where:
- X is a numpy array of size
nb_samplesx 2 (first column: user ID, second column: item ID) - and y is the column of ratings.
There are a couple of other methods that can be used for online fit, say model.predict_single_user(work_ids, user_parameters).
See zero.py as an example of dumb baseline (only predicts zeroes) to start from.
Results
Mangaki data
Movielens data
Feel free to use. Under MIT license.
Metadata
Release files for mangaki-zero 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mangaki-zero-1.1.0.tar.gz | 22.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mangaki_zero-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 58.3 kB
Release files / mangaki-zero-1.1.0.tar.gz
| Download URL | mangaki-zero-1.1.0.tar.gz |
|---|---|
| Size | 22.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b42dbc81e615d579970ac2ad853f831ab62317ddc4bc6774336a0f07f7351b26
|
|
BLAKE2b-256 checksum How to use checksums |
e8192d10b1540e9796e1fb46e0453d7fe1c3a3cf5c2c8a8c88052b47026fc93a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.10 CPython/3.8.11 Linux/5.8.0-1042-azure
|
Release files / mangaki_zero-1.1.0-py3-none-any.whl
| Download URL | mangaki_zero-1.1.0-py3-none-any.whl |
|---|---|
| Size | 35.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f0eae2875b16f465cfbedf2dffc482de7ac6746992ac83be44f7c3edffd90b6
|
|
BLAKE2b-256 checksum How to use checksums |
50399ab051804b4fb3e0e7b755315400414ab325f5094ad6ad951b751853c0c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.10 CPython/3.8.11 Linux/5.8.0-1042-azure
|