# pyensmallen

`pyensmallen` provides Python bindings for the `ensmallen` optimization library, with a focus on econometrics and supervised learning workflows.

## Install

Base install:

```bash
uv pip install pyensmallen
```

Development install with all test and notebook dependencies:

```bash
uv pip install --python .venv/bin/python ".[full]"
```

Editable install in this repository:

```bash
uv pip install --python .venv/bin/python meson meson-python ninja pybind11
uv pip install --python .venv/bin/python --no-build-isolation -e ".[full]"
```

## What is included

- Optimizers: `L_BFGS`, `FrankWolfe`, `SimplexFrankWolfe`, and Adam variants
- Objective helpers: linear, logistic, and Poisson losses
- Estimator classes: `LinearRegression`, `LogisticRegression`, `PoissonRegression`
- Inference: classical and robust sandwich standard errors for unregularized OLS and QMLE-style logit and Poisson
- GMM support with JAX autodiff

## Documentation map

- [Optimizers](optimizers.qmd): low-level optimizer classes and when to use them
- [Benchmarks](benchmarks.qmd): runtime and convergence comparisons against SciPy and statsmodels
- [Estimators](estimators.qmd): supervised estimators, fitted attributes, and inference
- [Notebooks](notebooks.qmd): examples and benchmark notebooks in this repository

## Notes

- The `full` extra installs Python packages required to run tests and notebooks.
- Quarto itself is an external CLI. Render this site with `scripts/render_docs.sh`.
