A library wrapping libffm
Project description
pylibffm
pylibffm is a wrapper around libffm to allow using scipy and numpy arrays as input. pylibffm requires SSE and openmp.
Installing
If you're running python 3.7~3.11 on linux
pip install pylibffm
Otherwise
git clone --recurse-submodules https://github.com/Sinacam/pylibffm
cd pylibffm
make
pip install .
Currently, the distribution is incredibly hacky and cannot be pip installed from source. Windows build support is lacking, but code should be correct.
Documentation
The API consists of
trainloadModelModel.saveModel.predict
make_bintrain_with_bin
Use help or read their docstring for their usage.
Diff with libffm
To be deterministic, set openmp threads to 1. For pylibffm, do
OMP_NUM_THREADS=1 python <script>.py
For libffm, run with -s 1 (the default). This should yield identical models.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pylibffm-0.4.1.tar.gz
(543.5 kB
view details)
File details
Details for the file pylibffm-0.4.1.tar.gz.
File metadata
- Download URL: pylibffm-0.4.1.tar.gz
- Upload date:
- Size: 543.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d54458ef8b4a292d83f009a0f165b950c92ef744f86e6ac72516c761542012c6
|
|
| MD5 |
9a0c19baa35ac2579a60fe368fe8fa65
|
|
| BLAKE2b-256 |
b742352cda1d0769eaa993ca498b9dd80b25c72c27da2af33e25683effae67eb
|