Skip to content

enrich(Infer-2): add Exercise 3 - regime change detection (See #2161) - #2392

Merged
jsboige merged 1 commit into
mainfrom
enrich/infer2-exercises-2161
Jun 4, 2026
Merged

jsboige merged 1 commit into
mainfrom
enrich/infer2-exercises-2161

Conversation

@jsboige

@jsboige jsboige commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Summary

Add 1 exercise to Infer-2-Gaussian-Mixtures for >=3 exercises convention (#2161).

New exercise: Detection d'un changement de regime par apprentissage en ligne

Placement: After section 8 (Online Learning), before section 9 (Extraordinary Events)

Content: Students simulate 4 weeks of cyclist data with a route change between weeks 2 and 3. Using the online learning framework taught in section 8, they track posterior evolution and detect the regime change.

Pedagogical rationale:

  • Practices the online learning concepts just taught (posterior as new prior)
  • Natural transition to extraordinary events problem in section 9
  • Concrete application of Bayesian updating for anomaly detection

Changes

  • 1 new markdown cell (exercise description with context, steps, and hints)
  • 1 new code cell (stub with TODOs: data generation, iterative update, posterior tracking, detection)

Validation

  • Papermill SUCCESS: 26/26 code cells executed (24s)
  • H.3 PASS: 26/26 exec_count, 26/26 with outputs, 0 errors
  • Exercise count: 2 -> 3 (now >=3 convention compliant)
  • Source changes: Only additions (2 new cells), 0 existing cells modified

See #2161

…learning (See #2161)

Add exercise after section 8 (Online Learning) asking students to detect
a regime change in cyclist route by tracking posterior evolution over
4 weeks. Natural transition to section 9 (Extraordinary Events).

2->3 exercises, Papermill SUCCESS (26/26 code cells with outputs).
H.3 PASS: 26/26 exec_count, 0 errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Notebook PR Validation: PASS

  • Notebooks checked: 1
  • Code cells validated: 26
  • Result: All passed

Checks: H.1 (no errors), H.3 (execution_count), C.1 (no banned patterns)
Non-Python kernels (.NET/Lean): C.1 + errors only (execution_count advisory)
QuantConnect notebooks: C.1 + errors only (require QC Cloud for execution)

@clusterManager-Myia clusterManager-Myia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[NanoClaw] LGTM.

Exercise 3 (regime change detection) well-structured: 4 TODOs with progressive hints, online Bayesian learning pedagogically sound. Massive SVG deletion (+122/-341) is cleanup (old graphviz embeds replaced by viz-js.com reference). New cell IDs clean. Path change cosmetic (re-exec). No concerns.

@jsboige
jsboige merged commit 1d448ae into main Jun 4, 2026
7 of 8 checks passed
@jsboige
jsboige deleted the enrich/infer2-exercises-2161 branch June 4, 2026 18:48
jsboige added a commit that referenced this pull request Jun 4, 2026
Rebase on origin/main includes merges #2389, #2392-2394, #2400, #2401.
Catalog regen preserves curated fields (last_validation, issue_pr_associee)
that were updated on main since branch creation.

See #2385
jsboige added a commit that referenced this pull request Jun 4, 2026
…learning (See #2161) (#2392)

Add exercise after section 8 (Online Learning) asking students to detect
a regime change in cyclist route by tracking posterior evolution over
4 weeks. Natural transition to section 9 (Extraordinary Events).

2->3 exercises, Papermill SUCCESS (26/26 code cells with outputs).
H.3 PASS: 26/26 exec_count, 0 errors.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
jsboige added a commit that referenced this pull request Jun 5, 2026
* enrich(RL): add PPO from scratch notebook rl_5c_ppo_from_scratch.ipynb (See #295, #1454)

- 26 cells (10 code, 16 markdown), 3 exercises, Papermill SUCCESS (70s)
- H.3 PASS: 10/10 exec_count, 0 errors
- Covers: clipped surrogate objective, PPO agent with mini-batch updates,
  GAE (lambda=0.95), PPO vs A2C comparison
- Exercises: (1) clipped surrogate implementation, (2) GAE ablation,
  (3) PPO vs A2C training comparison
- README RL updated: 8->9 notebooks, parcours, algorithmes, environnements
- Catalog: 512->513 entries

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore(catalog): regen after rebase on main — preserve curated fields

Rebase on origin/main includes merges #2389, #2392-2394, #2400, #2401.
Catalog regen preserves curated fields (last_validation, issue_pr_associee)
that were updated on main since branch creation.

See #2385

* chore(catalog): keep main's curated catalog+count-markers, avoid lossy regen (See #2433)

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
jsboige added a commit that referenced this pull request Jun 5, 2026
…learning (See #2161) (#2392)

Add exercise after section 8 (Online Learning) asking students to detect
a regime change in cyclist route by tracking posterior evolution over
4 weeks. Natural transition to section 9 (Extraordinary Events).

2->3 exercises, Papermill SUCCESS (26/26 code cells with outputs).
H.3 PASS: 26/26 exec_count, 0 errors.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
jsboige added a commit that referenced this pull request Jun 5, 2026
* enrich(RL): add PPO from scratch notebook rl_5c_ppo_from_scratch.ipynb (See #295, #1454)

- 26 cells (10 code, 16 markdown), 3 exercises, Papermill SUCCESS (70s)
- H.3 PASS: 10/10 exec_count, 0 errors
- Covers: clipped surrogate objective, PPO agent with mini-batch updates,
  GAE (lambda=0.95), PPO vs A2C comparison
- Exercises: (1) clipped surrogate implementation, (2) GAE ablation,
  (3) PPO vs A2C training comparison
- README RL updated: 8->9 notebooks, parcours, algorithmes, environnements
- Catalog: 512->513 entries

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore(catalog): regen after rebase on main — preserve curated fields

Rebase on origin/main includes merges #2389, #2392-2394, #2400, #2401.
Catalog regen preserves curated fields (last_validation, issue_pr_associee)
that were updated on main since branch creation.

See #2385

* chore(catalog): keep main's curated catalog+count-markers, avoid lossy regen (See #2433)

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants