# Estimators

`pyensmallen` now exposes estimator classes for common supervised learning and econometrics workflows:

- `LinearRegression`
- `LogisticRegression`
- `PoissonRegression`

## Basic usage

```python
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:

```python
model.confidence_intervals()
model.confidence_intervals(covariance_type="robust")
```

Compact summary output:

```python
summary = model.summary()
robust_summary = model.summary(covariance_type="robust")
```

`summary()` returns a numeric array with columns:

```text
[coef, se, ci_lb, ci_ub]
```

## Regularization

All three estimators currently accept:

- `alpha`
- `l1_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 covariance
- `covariance_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.
