Estimators
pyensmallen now exposes estimator classes for common supervised learning and econometrics workflows:
LinearRegressionLogisticRegressionPoissonRegression
Basic usage
import pyensmallen as pye
model = pye.LogisticRegression(fit_intercept=True)
model.fit(X, y)
coef = model.coef_
intercept = model.intercept_
probs = model.predict_proba(X)Fitted attributes
After calling fit, each estimator exposes:
params_coef_intercept_objective_value_
For unregularized fits, the inference layer also exposes:
covariance_std_errors_coef_std_errors_intercept_std_error_robust_covariance_robust_std_errors_robust_coef_std_errors_robust_intercept_std_error_
Inference helpers
Confidence intervals:
model.confidence_intervals()
model.confidence_intervals(covariance_type="robust")Compact summary output:
summary = model.summary()
robust_summary = model.summary(covariance_type="robust")summary() returns a numeric array with columns:
[coef, se, ci_lb, ci_ub]
Regularization
All three estimators currently accept:
alphal1_ratio
The intended use right now is ridge-like penalization. The L1 path is implemented with a smooth approximation to stay compatible with the current L-BFGS backend.
Inference is only exposed for unregularized fits (alpha == 0).
Covariance types
Supported inference modes:
covariance_type="nonrobust": model-based covariancecovariance_type="robust": sandwich covariance
For OLS, the robust path uses the score-based sandwich form. For logit and Poisson, the robust path uses QMLE-style sandwich inference.