Changelog¶
0.1.0 (2026-11-27)¶
The first release.
lasso_stream,elastic_net_stream,ridge_stream: penalized least squares from a pyfixest formula, with absorbed fixed effects (partialled out, never penalized), weights, unpenalized covariates and standardization. The penalty is chosen by K-fold cross-validation (lambda_min or lambda_1se), an information criterion (AIC, BIC, extended BIC, AICc), the plug-in penalty (lasso), or given. Cross-validation needs one pass over the data: each fold’s cross-products are kept apart. With several fixed effects,cv_fixed_effects="refit"estimates them again on each fold’s training rows.The group lasso and group elastic net (
groups=): each factor of the formula (groups="factors"), or groups you name, enters or leaves the model as a block, orthonormalized and penalized by the square root of its size, as grpreg does. Withalpha < 1, grpreg 3.6.0 can keep out a group that its objective admits (its strong rule and optimality checks leave outalpha); this package’s solution meets the optimality conditions, and agrees with grpreg’s wherever the two select the same groups.The plug-in (“rigorous”) penalty of Belloni, Chen, Chernozhukov and Hansen (2012), as hdm’s
rlassocomputes it, with heteroskedastic or cluster-robust loadings.double_selection_stream: post-double-selection inference (Belloni, Chernozhukov and Hansen 2014) for one or more treatments, with always-included controls and robust or clustered standard errors, returning an hdfe-stream regression result.groups=selects each factor among the controls as a block (group lassos).double_selection_iv_stream: post-double-selection with instruments (Chernozhukov, Hansen and Spindler 2015) for one endogenous treatment: the controls selected for the outcome, the treatment and each instrument (hdm’srlassoIVselectX), or, withselect_instruments=True, the instruments selected by a lasso of the treatment on them and the controls (hdm’srlassoIV); then 2SLS on the union, an hdfe-stream IV result with its first stage, or, withmethod="partialling_out", hdm’s estimate (2SLS on each variable’s residual from its own selected controls). Withsup_score=True, also the sup-score test (Belloni, Chen, Chernozhukov and Hansen 2012), whose test of the effect and confidence set stay valid however weak the instruments are: the bound on the critical value that lassopack’sivlassouses, with the confidence set solved exactly, or the multiplier bootstrap; iid, robust or clustered; from one more pass.double_ml_stream: double/debiased machine learning for the partially linear model (Chernozhukov et al. 2018), with lasso or elastic-net nuisances cross-fitted from the folds’ cross-products, one or more treatments, repeated cross-fitting, and robust or clustered standard errors from one more pass; DoubleML’s estimates and standard errors.debiased_lasso_stream: the debiased lasso (van de Geer, Buhlmann, Ritov and Dezeure 2014), confidence intervals for a lasso’s coefficients with iid, robust or clustered standard errors; hdi’slasso.projformulas, with each nodewise lasso’s penalty chosen by cross-validation.stability_selection_stream: stability selection with complementary pairs (Meinshausen and Buhlmann 2010; Shah and Samworth 2013), with stabs’ selection rule and bounds on the expected number of false selections, for covariates or groups.lasso_logit_stream,elastic_net_logit_stream,lasso_probit_stream,elastic_net_probit_stream,lasso_poisson_stream,elastic_net_poisson_stream: the penalized logit, probit and Poisson model, with no absorbed fixed effect or one, weights and unpenalized covariates; glmnet’s binomial and Poisson objectives. The penalty is chosen by cross-validation on the held-out deviance, an information criterion, (the logit) Belloni, Chernozhukov and Wei’s plug-in penalty (as hdm’srlassologit), or given. Fitted by proximal Newton on hdfe-stream’s stored rows (hdfe_stream.core.newton): each step is one read of the data, shared by every cross-validation model, with the products formed from each row’s nonzeros for a design of indicators; two to five reads per penalty. Or, withsolver="in_memory", by coordinate descent on the rows held in memory, faster for wide designs and up to a few hundred thousand rows;solver="auto"(the default) chooses between them. Returns aPenalizedLogitResult, withpredict()means (probabilities) andfixef().lasso_mlogit_stream,elastic_net_mlogit_stream,lasso_ologit_stream,elastic_net_ologit_stream,lasso_oprobit_stream,elastic_net_oprobit_stream: the penalized multinomial logit and ordered logit and probit, with no absorbed fixed effect or one, weights and unpenalized covariates. The multinomial logit has a coefficient for every outcome level and covariate, identified by the penalty (glmnet’sfamily = "multinomial", ungrouped, or withgrouped=Trueits grouped penalty, a covariate in or out for every level at once); the ordered models are ordinalNet’s parallel cumulative logit and probit, with the cutpoints unpenalized. The penalty is chosen by cross-validation on the held-out deviance, an information criterion, or given. Fitted by proximal Newton on logit-stream’s stored rows (logit_stream.core, logit-stream 0.8.0, thelogitextra): each step is one read of the data, shared by every cross-validation model. The multinomial logit can instead usesolver="in_memory": coordinate descent on the rows held in memory, faster while one model’s per-row state fits in the processor’s cache;solver="auto"(the default) chooses between them. Returns aPenalizedCategoricalResult, withpredict()probabilities for every level andfixef().double_selection_logit_stream: post-double-selection for a binary outcome (Belloni, Chernozhukov and Wei 2016): a lasso logit of the outcome, a weighted lasso of each treatment, and a final logit (hdfe-stream’sfeglm_stream) on the union, with its robust or clustered standard errors.PenalizedResult:summary(),tidy(),coef(),selected(),path(),cv(),plot_path(),plot_cv(),predict()andsample().etable: a table of penalized fits, their selected coefficients side by side with the fixed effects, the penalty, how it was chosen, the number selected, the cross-validated error and N; as Great Tables, a DataFrame, Markdown, HTML or LaTeX.