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.

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for pylibffm-0.2.3.tar.gz
Algorithm Hash digest
SHA256 531a61d1a98b6613bb66abf1b971f33c8f873d13099e818435b24a0db39d6d34
MD5 d2f4b01402867fecae7617f8d7555942
BLAKE2b-256 6bc35919889f94304b0e2c8d42a1b00d09926f6c5237d8b1a4d8d96d91c7ab7c

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