Metadata-Version: 2.1
Name: pylibffm
Version: 0.2.3
Summary: A library wrapping libffm
Home-page: https://github.com/Sinacam/pylibffm
Author: ntumlgroup
License: MIT License
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# pylibffm

pylibffm is a wrapper around libffm to allow using scipy and numpy arrays as input.

## Installing
If you're running python 3.7~3.11 on linux
```bash
pip install pylibffm
```
Otherwise
```bash
git clone 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 only consists of
+ `train`
+ `load`
+ `Model`
    + `Model.save`
    + `Model.predict`

Use `help` or read their docstring for their usage.

## Diff with libffm
To be deterministic, set openmp threads to 1. For pylibffm, do
```bash
OMP_NUM_THREADS=1 python <script>.py
```

For libffm, run with `-s 1` (the default). This should yield identical models.
