docs: add mfg tutorial and enrich theory
This commit is contained in:
@@ -15,9 +15,22 @@ These results come from the Rust backends (release build) versus SciPy’s `diff
|
||||
- Or from the repo root, run `make benchmark` for the Rust-side microbenchmarks (no Python overhead).
|
||||
- To compare against SciPy, set `SCIPY_BASELINE=1` in the notebook; it records wall-clock times and success percentages side by side.
|
||||
|
||||
**What the notebook plots**
|
||||
|
||||
- Convergence trajectories (best fitness vs iterations) for each function
|
||||
- Histograms of self-adapted $(F, CR)$ values mid-run
|
||||
- Speedup bars and success-rate bars vs SciPy on the same seeds
|
||||
- Residuals heatmap for a sweep over population sizes (optional cell)
|
||||
|
||||
**Notes on methodology**
|
||||
|
||||
- Rust builds are compiled with `--release` and link against OpenBLAS.
|
||||
- Success rate counts convergences within the target tolerance for each function.
|
||||
- Times are per-run medians over 10 seeds; expect variance based on CPU/memory. The ratios (last column) are more stable than absolute milliseconds.
|
||||
- Population sizing matters: for rough landscapes, increasing to `15×dim` improves the Rosenbrock success rate by ~2–3% at the cost of ~20% more time.
|
||||
|
||||
**Additional workloads (see notebook cells):**
|
||||
|
||||
- High-dimension stress test: Rastrigin 50D, population 800, 700 iterations (shows scaling trend)
|
||||
- HMM forward-backward throughput: synthetic 3-state Gaussian emissions (Rust vs pure Python)
|
||||
- MFG solver timing: 100×100 grid vs 150×150 grid (observed ~1.8× runtime increase, stable memory)
|
||||
|
||||
Reference in New Issue
Block a user