# Notebooks

The Quarto site includes executed versions of the core Python notebooks and links to the heavier benchmark notebooks. For the primary performance results, use the dedicated [Benchmarks](benchmarks.qmd) page.

## Rendered in the site

These notebooks are part of the Quarto build and are rendered as documentation pages:

- [example](notebooks/example.html)
  ERM-style linear, logistic, and Poisson regression examples.

- [banana](notebooks/banana.html)
  Optimizer demonstration on Rosenbrock's banana function.

- [gmm](notebooks/gmm.html)
  Linear IV GMM, nonlinear logit-style GMM, and bootstrap-based inference.

- [autodiff_mnl](notebooks/autodiff_mnl.html)
  JAX autodiff for multinomial logit with `pyensmallen` as the optimizer backend.

- [regularization_comparison](notebooks/regularization_comparison.html)
  Regularized estimator demo with `pyensmallen` versus scikit-learn and MSE path plots.

## Source-only notebooks

These remain in the repository but are not part of the always-executed Quarto build:

- [likelihood_comparison.ipynb](https://github.com/apoorvalal/pyensmallen/blob/feature/estimator_classes/notebooks/likelihood_comparison.ipynb)
  Large benchmark notebook comparing `pyensmallen` against SciPy, statsmodels, CVXPY, and JAX.

- [likelihood_comparison_estimators.ipynb](https://github.com/apoorvalal/pyensmallen/blob/feature/estimator_classes/notebooks/likelihood_comparison_estimators.ipynb)
  Benchmark notebook using the estimator-class API.

- [synth.ipynb](https://github.com/apoorvalal/pyensmallen/blob/feature/estimator_classes/notebooks/synth.ipynb)
  Synthetic-control style balancing weights and simulation work.

- [compare_r.ipynb](https://github.com/apoorvalal/pyensmallen/blob/feature/estimator_classes/notebooks/compare_r.ipynb)
  R notebook, not part of the Python-backed docs build.

## Build behavior

The Quarto documentation build executes the rendered notebooks above. This keeps the core tutorial material live and testable without forcing every expensive benchmark notebook into the site build.

## Running notebooks locally

Install the full dependency set:

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

Then launch Jupyter:

```bash
.venv/bin/python -m jupyter lab
```
