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

Uploaded Source

File details

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

File metadata

  • Download URL: pylibffm-0.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 4b82ec9d915bb6628637fee3a203a41befca4c09e6685f3189b3378a78fe1aac
MD5 98a11783282158df878a9f3238c60544
BLAKE2b-256 a4ca607acccfc89aca410515a890296fa2d83ec3e07d246b98545c8c5df13a1b

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