All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.6.0 - 2026-08-17
- New statistics API (
anofox-statistics0.4.1 → 0.4.2):one_way_anova— one-way ANOVA with Fisher and Welch variants; returns F-statistic, degrees of freedom, p-value, sums of squares, and η² effect size.two_way_anova— two-way ANOVA with A×B interaction term; partitions variance into main effects (A, B) and interaction (A×B).repeated_measures_anova— repeated-measures ANOVA with Mauchly's sphericity test and Greenhouse-Geisser / Huynh-Feldt ε corrections.energy_distance_nd— multivariate energy distance for two multivariate samples (generalization ofenergy_distanceto arbitrary dimension).icc— intraclass correlation with real matrix-input contract; replaced the previous all-NaN stub (see Breaking Changes).
- New regression model classes (
anofox-regression0.5.4 → 0.5.13):- GLM family:
Gamma(log link, positive data),GLMM(generalized linear mixed model with random intercepts),PSpline(penalized B-spline smoother). - Robust / sparse linear:
TheilSen(median-of-slopes, ~29% breakdown point),RANSAC(random sample consensus),BayesianRidge(evidence-maximisation hyperparameter tuning),ARD(automatic relevance determination with per-feature precision),LARS(least angle regression with full path),PassiveAggressive(online PA/PA-I/PA-II regression). - Online learning:
MomentAccumulator— accumulates sufficient statistics (XᵀX, Xᵀy) from streaming batches; pass toOLS.fit_from_accumulatororRidge.fit_from_accumulator. - HC-robust inference:
Ridge.hc_inference(X, y, hc_type)— HC0–HC3 sandwich standard errors for Ridge fits. - GLM diagnostic expressions for Gamma GLM fits:
gamma_dispersion_deviance,gamma_dispersion_pearson,gamma_pearson_chi_squared,gamma_standardized_pearson_residuals,gamma_standardized_deviance_residuals.
- GLM family:
- Updated
anofox-statisticsdependency 0.4.1 → 0.4.2. - Updated
anofox-regressiondependency 0.5.4 → 0.5.13. - Column-pivot correctness fix (inherited from
anofox-regression0.5.13): OLS, WLS, and NNLS models trained on differently-scaled designs (e.g. one predictor in units of thousands while another is in units of ones) now return correct coefficients. The previous release could pivot to the wrong column when building the design matrix, causing coefficients to be assigned to the wrong predictor.
iccnew contract: the expression now accepts one column per rater (ps.icc("rater1", "rater2", "rater3", icc_type="icc3")) and computes real ICC values validated against R'sirr::icc(). The old single-column stub always returned NaN and is removed. Update call sites to pass all rater columns explicitly.
WLS.hc_inferenceraisesNotImplementedError— heteroscedasticity-consistent inference is not yet implemented for WLS; useOLS.hc_inferenceorRidge.hc_inferenceas alternatives.iccmatrix-input contract change: code passing only a single column tops.icc()must be updated to pass one column per rater.
0.5.0 - 2026-05-28
- Hybrid crate (Rust + Python) —
polars-statisticsnow builds as both acdylib(Python plugin) and anrlib(Rust dependency). Every Polars expression has a public<name>_fitRust entry point inpolars_statistics::expressions. NewpythonCargo feature gates the pyo3 / numpy / pymodels surface; downstream Rust crates usedefault-features = false. (#13) - New regression model wrappers:
Huber— M-estimator robust to outliers; class +huber()expression. (#14)LogisticRegression— sklearn-style API withpredict_proba,decision_function,score,penalty="l2",Ckwarg. Distinct from the existingLogisticwrapper. (#14)PLS— Partial Least Squares withtransform()for the latent space; class +pls()expression. (#19)
- Penalized IRLS
lambda_kwarg on the GLM PyClass models —PyLogistic,PyPoisson,PyNegativeBinomial,PyTweedie,PyProbit,PyCloglog(the expression layer already supported it). (#15) - ALM expression parity with
PyALM— all 25 distributions reachable fromps.alm(...), plusloss,link,role_trim, andextra_parameterkwargs. (#16) - Summary / predict completeness — added the matching expressions for
families that previously only had a base fit (#18):
quantile_summary,quantile_predictisotonic_predictlm_dynamic_predict
- Diagnostics toolkit (#17 + #27):
- Multicollinearity:
vif,generalized_vif,high_vif_predictors - OLS residual battery:
standardized_residuals,studentized_residuals,externally_studentized_residuals,residual_outliers - GLM residuals (logistic + Poisson):
*_pearson_residuals,*_deviance_residuals,*_working_residualsfor each family - Influence / leverage:
leverage,cooks_distance,dffits,influential_cooks,influential_dffits,high_leverage_points - Goodness of fit:
pearson_chi_squared_logistic,pearson_chi_squared_poisson
- Multicollinearity:
- Documentation:
- Sweep of the README and mkdocs site to cover every v0.5.0 addition.
- New "Use from Rust" section +
examples/rust_wls.rswalking through the rlib path.
- Updated
anofox-regressiondependency to v0.5.4 (introducesHuberRegressorand the sklearn-styleLogisticRegression) - Updated
anofox-statisticsdependency to v0.4.1 - Python
__version__caught up from 0.3.0 → 0.5.0 (was lagging two minor versions behind the wheel metadata)
Additive. PyLogistic is unchanged — the new sklearn-style
LogisticRegression is a separate class. The alm() expression's input
contract grew but all existing keyword-only callers continue to work
because the new kwargs default to None / "likelihood".
0.4.0 - 2026-01-17
-
Robust Regression:
quantile- Quantile regression (median and arbitrary quantiles)isotonic- Isotonic (monotonic) regression using PAVA algorithmQuantileandIsotonicmodel classes for scikit-learn-style API
-
Regression Diagnostics:
condition_number- Detect multicollinearity via condition number analysischeck_binary_separation- Detect complete/quasi-complete separation in logistic regressioncheck_count_sparsity- Detect sparsity issues in Poisson/count regression
-
Conda-forge Support:
- Added conda-forge recipe for
conda install polars-statistics - CI workflow for conda package building and testing
- Added conda-forge recipe for
-
Documentation:
- Reorganized API documentation into modular structure
- Added detailed descriptions for all statistical tests
- New docs for TOST equivalence tests, correlation, categorical tests, and forecast comparison
- Updated
anofox-regressiondependency to v0.5.1 - Updated
pyo3to v0.27 - Updated
faerto v0.23.2 - Improved cross-platform test compatibility for GLM functions
0.3.0 - 2024-12-22
-
TOST Equivalence Tests (10 functions):
tost_t_test_one_sample- One-sample equivalence testtost_t_test_two_sample- Two-sample equivalence testtost_t_test_paired- Paired samples equivalence testtost_correlation- Correlation equivalence test (Pearson/Spearman)tost_prop_one- One-proportion equivalence testtost_prop_two- Two-proportion equivalence testtost_wilcoxon_paired- Non-parametric paired equivalence testtost_wilcoxon_two_sample- Non-parametric two-sample equivalence testtost_bootstrap- Bootstrap-based equivalence testtost_yuen- Trimmed means equivalence test
-
Correlation Tests (7 functions):
pearson- Pearson correlation with confidence intervalsspearman- Spearman rank correlationkendall- Kendall's tau (variants a, b, c)distance_cor- Distance correlation (detects nonlinear relationships)partial_cor- Partial correlation controlling for covariatessemi_partial_cor- Semi-partial (part) correlationicc- Intraclass correlation coefficient
-
Categorical Tests (13 functions):
binom_test- Exact binomial testprop_test_one- One-sample proportion testprop_test_two- Two-sample proportion testchisq_test- Chi-square test for independencechisq_goodness_of_fit- Chi-square goodness of fit testg_test- G-test (likelihood ratio test)fisher_exact- Fisher's exact test for 2x2 tablesmcnemar_test- McNemar's test for paired proportionsmcnemar_exact- McNemar's exact testcohen_kappa- Cohen's Kappa for inter-rater agreementcramers_v- Cramer's V for association strengthphi_coefficient- Phi coefficient for 2x2 tablescontingency_coef- Contingency coefficient (Pearson's C)
-
Comprehensive test suite for all new statistical tests
- Updated
anofox-statisticsdependency to v0.4.0 - Updated
anofox-regressiondependency to v0.4.0
0.2.0 - 2024-12-15
-
R-style Formula Syntax:
ols_formula,ridge_formula,elastic_net_formula, etc.- Support for polynomial terms:
poly(x, 2) - Support for interactions:
x1 * x2expands tox1 + x2 + x1:x2 - Support for explicit transforms:
I(x^2)
-
Summary Functions for tidy coefficient output:
ols_summary,ridge_summary,elastic_net_summarywls_summary,rls_summary,bls_summarylogistic_summary,poisson_summary,negative_binomial_summarytweedie_summary,probit_summary,cloglog_summary,alm_summary- Returns: term, estimate, std_error, statistic, p_value
-
Prediction Functions with intervals:
ols_predict,ridge_predict,elastic_net_predict, etc.- Support for confidence and prediction intervals
- Configurable confidence level
-
Additional Regression Models:
WLS- Weighted Least SquaresRLS- Recursive Least SquaresBLS- Bounded Least SquaresNNLS- Non-negative Least Squares
-
GLM Models:
Logistic- Logistic regressionPoisson- Poisson regressionNegativeBinomial- Negative binomial regressionTweedie- Tweedie regressionProbit- Probit regressionCloglog- Complementary log-log regression
-
ALM (Augmented Linear Model):
- Support for 24+ distributions (normal, laplace, cauchy, student-t, etc.)
- Robust regression alternatives
-
Dynamic Models:
LmDynamic- Dynamic linear model with forgetting factorlm_dynamicexpression for rolling regression
-
Demand Classification:
Aid- Automatic Item-level Demand classificationaidandaid_anomaliesexpressions- Based on Kolassa (2025) methodology
-
Model Classes for Statistical Tests:
TTestInd,TTestPaired- t-test classesBrownForsythe,YuenTest- variance/robust testsMannWhitneyU,WilcoxonSignedRank,KruskalWallis,BrunnerMunzelShapiroWilk,DAgostino- normality tests
-
Forecast Comparison Tests:
diebold_mariano- Diebold-Mariano testclark_west- Clark-West testspa_test- Superior Predictive Ability testmodel_confidence_set- Model Confidence Setmspe_adjusted- MSPE-adjusted testpermutation_t_test- Permutation t-test
-
Modern Distribution Tests:
energy_distance- Energy distance testmmd_test- Maximum Mean Discrepancy test
-
Bootstrap Methods:
StationaryBootstrap- Stationary bootstrap for time seriesCircularBlockBootstrap- Circular block bootstrap
- Renamed
regress-rsdependency toanofox-regression - Improved documentation with API reference
0.1.0 - 2024-11-01
-
Initial release of polars-statistics
-
Core Statistical Tests:
ttest_ind- Independent samples t-testttest_paired- Paired samples t-testbrown_forsythe- Brown-Forsythe test for variance equalityyuen_test- Yuen's test for trimmed means
-
Non-parametric Tests:
mann_whitney_u- Mann-Whitney U testwilcoxon_signed_rank- Wilcoxon signed-rank testkruskal_wallis- Kruskal-Wallis H testbrunner_munzel- Brunner-Munzel test
-
Distributional Tests:
shapiro_wilk- Shapiro-Wilk normality testdagostino- D'Agostino-Pearson normality test
-
Regression Models:
OLS- Ordinary Least SquaresRidge- Ridge regressionElasticNet- Elastic Net regression- Expression API:
ols,ridge,elastic_net
-
Polars Integration:
- Full support for
group_byaggregations - Full support for
overwindow functions - Lazy evaluation support
- Struct output for all statistical results
- Full support for
-
Performance:
- Rust-powered with zero-copy data transfer
- SIMD-optimized linear algebra via faer
- Automatic parallelization for group operations