fklearn: Functional Machine Learning
Maintenance notice: fklearn is deprecated, and support is limited. The library is chapter-owned; no specific team maintains it.
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
- Validation should reflect real-life situations.
- Production models should match validated models.
- Models should be production-ready with few extra steps.
- 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 --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 --no-config --default-index https://pypi.org/simple/
--no-config excludes local index settings such as Nubank's internal registry.
Before committing the lockfile, check that package source URLs point to public
PyPI and contain no credentials.
License
Release files for fklearn 4.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fklearn-4.3.0.tar.gz | 270.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fklearn-4.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 354.2 kB
Release files / fklearn-4.3.0.tar.gz
| Download URL | fklearn-4.3.0.tar.gz |
|---|---|
| Size | 270.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cbb87b87f04fee7e4b227c166e25e86d64c21956d09ef962eaab1927872f346b
|
|
BLAKE2b-256 checksum How to use checksums |
116e353ac8da64dfc9a83fd1191805b1999e6c2d9a00988c4308550d8fe0bf58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / fklearn-4.3.0-py3-none-any.whl
| Download URL | fklearn-4.3.0-py3-none-any.whl |
|---|---|
| Size | 83.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c97a9e9cd415e72b6d0700264a351eaf159ae54d5ef3f308378ddd9e8e0dc470
|
|
BLAKE2b-256 checksum How to use checksums |
5be428a973b42312c2f14260edf862e3b59dae70e71309a4e97dc1d8e90564be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|