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

Uploaded Source

File details

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

File metadata

  • Download URL: pylibffm-0.2.4.tar.gz
  • Upload date:
  • Size: 541.8 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.4.tar.gz
Algorithm Hash digest
SHA256 612656c6f9f3d9875e7be4204a942a2193fd05fbe1282095183f204aa76a723f
MD5 4e27711ed181ac1e478b958828000960
BLAKE2b-256 be8432276daf8f68646730307ff3fed5047557726de03f14148ffd82a9ffaa69

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