Skip to main content

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 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

OMP_NUM_THREADS=1 python <script>.py

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

Project details


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.3.0.tar.gz (542.2 kB view details)

Uploaded Source

File details

Details for the file pylibffm-0.3.0.tar.gz.

File metadata

  • Download URL: pylibffm-0.3.0.tar.gz
  • Upload date:
  • Size: 542.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.11

File hashes

Hashes for pylibffm-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9aaa216f0d02fdd7d2ab3a917135727d83a53c24ad1764f08760b1a328177732
MD5 b5f1bfa2fa388b83bc5984cef65ed2a1
BLAKE2b-256 d2f24a08cb517394ed42b098e48d44694d352cee4a5fd7243a2bb70714b0fea6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page