Skip to main content

Functional machine learning

Project description

fklearn: Functional Machine Learning

PyPI Documentation Status Gitter Tests License

fklearn uses functional programming principles to make it easier to solve real problems with Machine Learning.

The name is a reference to the widely known scikit-learn library.

fklearn Principles

  1. Validation should reflect real-life situations.
  2. Production models should match validated models.
  3. Models should be production-ready with few extra steps.
  4. Reproducibility and in-depth analysis of model results should be easy to achieve.

Documentation | Getting Started | API Docs | Contributing |

Installation

To install via pip:

pip install fklearn

To install with optional dependencies:

pip install fklearn[lgbm]       # LightGBM support
pip install fklearn[xgboost]    # XGBoost support
pip install fklearn[catboost]   # CatBoost support
pip install fklearn[all_models] # All model backends
pip install fklearn[all]        # All models + tools

Development with UV

fklearn uses uv for dependency management. uv sync creates a virtual environment, installs all locked dependencies, and installs fklearn itself in editable mode (the default for uv projects) so changes under src/ are picked up without reinstalling.

Setup

uv sync                 # core deps + dev group
uv sync --all-extras    # also installs lgbm / xgboost / catboost / tools / demos / docs

The dev dependency group (pytest, ruff, mypy, hypothesis) is included by default via tool.uv.default-groups, so uv sync alone is enough for most development workflows.

Running Tests

uv run pytest --cov=src/

Linting

uv run ruff check src/ tests/
uv run ruff format src/ tests/

Adding Dependencies

uv add <package-name>          # runtime dependency
uv add --dev <package-name>    # dev dependency

Note for Nubank contributors

Regenerate the lockfile with --default-index https://pypi.org/simple/:

uv lock --default-index https://pypi.org/simple/

License

Apache License 2.0

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

fklearn-4.2.0.tar.gz (219.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fklearn-4.2.0-py3-none-any.whl (83.0 kB view details)

Uploaded Python 3

File details

Details for the file fklearn-4.2.0.tar.gz.

File metadata

  • Download URL: fklearn-4.2.0.tar.gz
  • Upload date:
  • Size: 219.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fklearn-4.2.0.tar.gz
Algorithm Hash digest
SHA256 20760ce3e503d4dfbd3141c8011199020fca26dfefee7b0570cec95a50d48609
MD5 1e72154986f836c4cca4fbda8920a733
BLAKE2b-256 7309d4860e3fc793fc8491b3e2514e224ed0eb4f9ab1eb6979c8a56518c634bc

See more details on using hashes here.

File details

Details for the file fklearn-4.2.0-py3-none-any.whl.

File metadata

  • Download URL: fklearn-4.2.0-py3-none-any.whl
  • Upload date:
  • Size: 83.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fklearn-4.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99dc63b5a381293ca43028d9c126a624985a1ae686b51815c306831a162af878
MD5 5b1789f2f62af18b65b1120fdff85020
BLAKE2b-256 9ddcfc9928fde276756fa7eb00f57b9b13ec5b2fe18d0e3236c2fef8c456bd80

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