polars-online

This is the API reference of polars-online, built from its docstrings, for a reader who has met the library in the README and wants one call’s parameters, output and refusals. Install it with pip install polars-online.

polars-online fits models online for Polars: linear models, streaming moments, clustering and regime detection, for data too large to hold in memory at once. The Rust core runs three ways: inside a Polars query (lf.online.fit_predict(specs)), fed chunks by a ModelBank, and from the polars-online command line. Every row is predicted before it is learned from, and the numbers are the same whichever way the bank runs.

Each module’s page lists its functions and classes by family, and each function and class has a page of its own. The guides, which the README’s map leads to, show each call at work: the models, which calls stream, the state-file workflow, and performance. The feature index lists every function and class with a line each. The highlights page runs four use cases end to end. Each model’s update equations are in its builder’s docstring.

page

what it documents

polars_online

ModelBank, the package’s own functions (fit_predict, predict, unnest, target), its errors, its warnings and its versions

polars_online.spec

the model builders by family (regressions, robust regressions, covariance and regimes, changepoints and sequential tests, clustering and classification), the parameters every spec shares, and the fields each model writes

The online namespaces

lf.online and df.online: a bank run inside a query, or on a frame in memory

polars_online.stream

transforms of a stream before a bank: windows as columns, targets whose values arrive late, and series that tick at their own times

polars_online.ops

the window operators, Polars expressions over a stream’s clock that look back or ahead

polars_online.eval

scores of a bank’s output, over a frame or one chunk at a time, and tests of one spec’s residuals against another’s

polars_online.gram

the Grams a bank exports: pooled, narrowed, solved, and given standard errors

polars_online.corr

correlation matrices: read, repaired, summarized, told from noise and scored

polars_online.sim

a seeded simulator of correlation regimes, its truth beside the data

polars_online.gbdt

XGBoost’s and LightGBM’s training inputs, binned from a stream