5 Commits

Author SHA1 Message Date
ThotDjehuty 8caf0488d9 fix(notebooks): suppress Pylance noise in example notebooks
- Add file-level pyright directive (reportArgumentType, reportAttributeAccessIssue,
  reportPrivateImportUsage, etc.) to all code cells
- Add import sentinels for Callable/Tuple/ParameterGrid/Axes3D
- Convert LaTeX label strings to raw strings (fix unsupported \m, \i escapes)
- 14_mckean_vlasov: 2 errors -> 0
- 05_performance_benchmarks: 6 errors -> 0
- mean_field_games_tutorial: 10 errors -> 0
2026-05-16 22:35:20 +02:00
ThotDjehuty b6a1e1a953 feat(v2): propagation-of-chaos animation, README section, notebook sandwich
- examples/animate_propagation_of_chaos.py: 4-panel McKean-Vlasov
  simulator at N in {20, 100, 500, 4000} with reference N=12000;
  bottom panel tracks W_2(mu^N_t, mu_t) on log scale -> visible
  1/sqrt(N) decay (Sznitman 1991).
- examples/propagation_of_chaos.gif (1.6 MB)
- README: new 'Propagation of chaos' subsection under
  Mean-field & agent-based dynamics, with empirical-measure
  formula, k-tuple factorisation and GIF embed.
- examples/notebooks/14_mckean_vlasov.ipynb: sandwich PRE/code/POST
  cells demonstrating W2 ~ 1/sqrt(N) on the same simulator.
  Verified executed: sqrt(N)*W2 ~ 0.7 across N (theoretical const).
2026-05-14 22:43:47 +02:00
ThotDjehuty 0a349f7391 docs(v2.0.0-alpha.7): enrich notebooks 07/08/10/14 to 03-tutorial depth
Notebooks 07 (topology), 08 (volterra), 10 (bsde) and 14 (mckean_vlasov)
now follow the same pedagogical template as the optimal-control tutorial:

- Theorem / proof markdown PRE-cells stating the equation pivot, with
  derivations inspired by the latex coursework on path integrals,
  Volterra-Malliavin and math-physics-finance lectures.
- Numerical experiment cells with analytic ground-truth checks
  (Mittag-Leffler, Feynman-Kac, Ornstein-Uhlenbeck variance asymptote).
- Markdown POST-cells stating the expected result, how to read each
  figure, and the conclusion linking back to the API.
- Concrete real-world applications:
    * 07 topology -> physics: persistent H1 detects the hole of a thin
      annulus vs a filled disk.
    * 08 volterra -> sub-diffusion fractional Fokker-Planck moments.
    * 10 bsde -> heat equation expectation as a linear BSDE.
    * 14 mckean_vlasov -> opinion dynamics on a population.

All cells executed end-to-end with the rhftlab kernel; outputs (figures,
prints, ground-truth errors) are embedded as proof of work.

Includes the deterministic builder script _build_enriched_v2.py used to
regenerate the four notebooks.
2026-05-12 19:23:49 +02:00
ThotDjehuty dd51156174 docs(v2.0.0-alpha.4): enrich v2.0 notebooks with FR sandwich + real-world examples
Each of the eight v2.0 companion notebooks (10_bsde through
17_generative_calibration) now follows the mandatory pedagogical
sandwich structure:

  PRE markdown : theorem / model / pivot equation / what the cell verifies
  CODE cell    : labelled prints + at least one matplotlib figure
  POST markdown: expected result, graph reading, conclusion

Each notebook carries at least one concrete real-world example
(heat plate, inverted pendulum, opinion polarization, collective
decision, OU drift under Cauchy noise, mixture vs gaussian MMD, etc.)

Generator script: scripts/enrich_v2_notebooks.py
Doc plots refreshed via scripts/inject_doc_plots.py.
2026-05-12 16:07:42 +02:00
ThotDjehuty d8682f61e5 release(v2.0.0-alpha.2): PyO3 bindings + executed companion notebooks + Sphinx RST with inline plots
PyO3 abi3 bindings for the 13 v2.0.0 functions across 8 module groups:
  bsde, pde, stochastic_control, optimal_control::quadratic_impact_control,
  mean_field::mckean_vlasov, agent_based, inference, optimization.

8 executed companion notebooks under examples/notebooks/10_bsde.ipynb …
17_generative_calibration.ipynb (cell outputs and matplotlib figures
preserved as proof-of-work; verified against analytic ground truths).

8 Sphinx RST pages under docs/source/algorithms/{bsde,pde,stochastic_control,
quadratic_impact_control,mckean_vlasov,agent_based,robust_drift,
generative_calibration_hooks}.rst with .. math:: derivations and inline
.. image:: directives placed immediately after each .. code-block:: python
so each plot appears directly under the code that produced it.

18 PNG plot assets under docs/source/_static/v2/<group>/.

index.rst extended with a new 'v2.0 Generic Stochastic Control & PDE'
toctree caption.

Forbidden-vocabulary audit on new src/, docs/source/algorithms/ and
binding files: zero matches.

All previously stable APIs untouched; v2.0.0 is additive at the binding
level — no v1.x function signature was changed.
2026-05-12 12:18:14 +02:00