Installation¶
Requirements¶
Python 3.11 or later
NumPy >= 1.21
Pandas >= 1.3
From PyPI (Recommended)¶
pip install onlinerake
From Source¶
Clone the repository and install in development mode:
git clone https://github.com/finite-sample/onlinerake.git
cd onlinerake
uv sync
Development Installation¶
For development work, install with additional dependencies:
uv sync --group dev --group test
Verify Installation¶
Test that the package is working correctly:
import onlinerake
from onlinerake import OnlineRakingSGD, OnlineRakingMWU, Targets
# Run a quick test
targets = Targets()
raker = OnlineRakingSGD(targets)
obs = {"age": 1, "gender": 0, "education": 1, "region": 0}
raker.partial_fit(obs)
print(f"Success! Margins: {raker.margins}")
You can also explore the interactive tutorials:
# Install with documentation dependencies
pip install onlinerake[docs]
# Launch Jupyter notebooks
jupyter notebook docs/notebooks/