Skip to content

docs(probas,#8081): PyMC-19 foundational citations (Weibull 1951 / Kaplan-Meier 1958 / Cox 1972) - #8302

Merged
jsboige merged 1 commit into
mainfrom
feature/c844-pymc19-citations-8081
Jul 24, 2026
Merged

jsboige merged 1 commit into
mainfrom
feature/c844-pymc19-citations-8081

Conversation

@myia-po-2023

Copy link
Copy Markdown
Collaborator

Grain: MED/notebook-probas-pymc19-citations — lane myia-po-2023:CoursIA-2 — prev: MED/docs-hygiene (c.839), tool twin-parity (c.840/c.842)

c.844 — PyMC-19 foundational citations (#8081 axis-1, Python twin of #8257)

Scope

PR de citations canoniques sur le notebook Python de l'analyse de survie, miroir de la
PR #8257 (po-2025, MERGED 2026-07-24) qui a couvert le jumeau .NET Infer-19.

Issue epic #8081 (axe-1 = fidélité distillation = citations canoniques) : la tranche
GameTheory / Infer / PyMC a déjà été resyncée pour #7594 / #6855 / #7610 / #4365 / #5081
(GameTheory), et pour Infer-2 / Infer-11 / Infer-12 / PyMC-2 / PyMC-11 / Infer-13 /
Infer-19 (c.830-c.834 + c.838 + #8257). Cette PR comble le dernier gap du corpus 19 :
le notebook PyMC-19-Survival-Analysis (jumeau Python de Infer-19, créé #5346) cite
Weibull, Kaplan-Meier et Cox sans référence aux papiers primaires fondateurs.

Changements

Substance : 1 fichier modifié, +30/-2 lignes (atomic, G.4 strict, byte-surgical).

Cellule Concept Citation ajoutee
cell[9] (section 4 "Value-add PyMC : inferer DIRECTEMENT la forme Weibull k") Loi de Weibull Weibull, W. (1951), J. Applied Mechanics 18(3):293-297 (blockqoute > *Origine.* inline)
cell[14] (Exercice 1 — Censure à droite) Censure non-paramétrique Kaplan & Meier (1958), JASA 53(282):457-481 (blockqoute > *Reference.* inline)
cell[20] (Conclusion) Extension canonique + References Cox (1972), JRSS Series B 34(2):187-220 (paragraphe "Pour aller plus loin") + nouveau ### References avec les 3 papiers primaires annotés

Total : +2311 chars sur 3 cellules markdown, 0 cellule code touchée, 0 output hand-édité.

Méthode (byte-surgical, anchor vérifié verbatim)

  1. Lecture first-hand de PR docs(probas,#8081): Infer-19 Survival foundational citations (Weibull 1951 / Kaplan-Meier 1958 / Cox 1972) #8257 (gh pr view 8257 --json body) pour confirmer le
    pattern appliqué au jumeau .NET :

    • cell[13] Weibull intro : > *Origine.* Weibull (1951, *J. Applied Mechanics* 18(3):293-297)
    • cell[20] Exercice 1 : > *Reference.* Kaplan & Meier (1958, *JASA* 53(282):457-481)
    • cell[26] Conclusion : \n\n---\n\n### References\n\n**Sources fondatrices (papiers primaires).**\n\n- Weibull (1951) ...\n- Kaplan & Meier (1958) ...\n- Cox (1972) ...
  2. Lecture first-hand du notebook PyMC-19 : 21 cellules (13 markdown + 8 code). Vérifié
    que les cellules équivalentes existent et n'ont pas déjà la citation :

    • cell[9] (Weibull intro) : parle de "loi de Weibull generalise" + "forme k" sans citer
    • cell[14] (Exercice 1) : "censure a droite", mentionne $S(c_i)$ sans citer Kaplan-Meier
    • cell[20] (Conclusion) : mentionne "modeles a risques concurrents" sans citer Cox (1972)
  3. Patch Python (json + LF-only) : 3 listes cells[i]['source'] reconstruites verbatim
    (lignes originales + lignes ajoutées), assertion d'ancrage actual == old avant chaque
    modification, écriture binaire f.write(json.dumps(...).encode('utf-8')) pour préserver
    LF-only (cf L965 ★ de c.840). Total diff : +30/-2 cellules (nbformat indent=1).

  4. Citation Salvatier et al. (2016) ajoutée au References — moteur NUTS utilisé dans le
    notebook (peer-reviewed PeerJ Computer Science 2:e55). Différencie PyMC-19 du jumeau
    .NET (qui cite Lawless + documentation Infer.NET).

Verifications

  • Atomicité G.4 : +30/-2 strict, 1 fichier, 1 sujet (= tranche PyMC-19 pedagogy post-docs(probas,#8081): Infer-19 Survival foundational citations (Weibull 1951 / Kaplan-Meier 1958 / Cox 1972) #8257).
  • Catalogue byte-identique : COURSE_CATALOG.generated.json / .md non touchés (aucun marqueur
    CATALOG-STATUS dans PyMC-19, donc pas de pollution catalogue).
  • LF-only CR=0 : raw.count(b'\r\n') == 0 sur le fichier post-patch ✓.
  • Pas de ré-exécution Papermill : modifications markdown-only sur 3 cellules,
    0 cellule code touchée, 0 output hand-édité (exception C.2 confirmée).
  • Validateur H.3 validate_pr_notebooks.py PyMC-19-Survival-Analysis.ipynb :
    PASS (8 code cells, execution_count + outputs cohérents).
  • C.1/C.3 audit audit_c1_c3.py --family Probas : 58/58 PASS, 0 violation.
  • Aucun autre fichier touché : git diff --name-only = 1 fichier
    (PyMC-19-Survival-Analysis.ipynb). Pas de contamination scratchpad (body généré hors
    worktree, cf L677-L4 ★★).
  • G.1 verify-before-claiming : valeurs verbatim viennent du body PR docs(probas,#8081): Infer-19 Survival foundational citations (Weibull 1951 / Kaplan-Meier 1958 / Cox 1972) #8257 (lignes
    EXEC_PROVED) + SearXNG/WebFetch (références bibliographiques canoniques 1951/1958/1972).
    Pas de fabrication.
  • Sécurité secrets : grep API_KEY|TOKEN|sk-|ghp_|AIza|os.getenv("KEY", "literal") sur
    diff → 0 hit.
  • Genre G-VAR-3 OK : sub-genre notebook-citations PyMC twin ≠ notebook-citations C# twin (docs(probas,#8081): Infer-19 Survival foundational citations (Weibull 1951 / Kaplan-Meier 1958 / Cox 1972) #8257) ≠ vagues c.830-c.834 (Infer-2/11/12/PyMC-11) ≠ c.838 (Crowdsourcing) —
    substance genuinely distincte (litmus L954 ★ OK : PyMC-19 = NUTS + arviz LOO + Sal-
    vatier 2016 ≠ Infer-19 EP + Lawless + Variable.GammaFromShapeAndRate).
  • Pivot cross-famille L954 ★ OK : c.839 docs-hygiene + c.840/c.842 twin-parity +
    c.841 hub-resync + c.843 abort (collision L898 ★★★) → 4ᵉ pivot distinct, R6 variété
    respectée.

Hors scope (pour mémoire)

Liens

🤖 Generated with Claude Code

docs(probas,#8081): PyMC-19 foundational citations (Weibull 1951 / Kaplan-Meier 1958 / Cox 1972)

Mirror of PR #8257 (po-2025, MERGED 2026-07-24) on the Python twin of Infer-19.

3 markdown cells modified, 0 code cells touched, +2311 chars added:
- cell[9]: Weibull (1951) citation inline at Weibull intro (section 4)
- cell[14]: Kaplan & Meier (1958) citation inline at Exercice 1 (Censure a droite)
- cell[20]: Cox (1972) citation at Conclusion + new ### References section with
  the 3 primary papers + Salvatier et al. (2016) PyMC3 paper

Grain: MED/notebook-probas-pymc19-citations. Lane: myia-po-2023:CoursIA-2.
See #8081 (axis-1 fidelity, partial).

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

Copy link
Copy Markdown
Contributor

Notebook PR Validation: PASS

  • Notebooks checked: 1
  • Code cells validated: 8
  • 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)

@github-actions

Copy link
Copy Markdown
Contributor

Golden-Set Execution (H.7 P3)

✅ 8/8 notebooks passed (certified reproducible)

Notebook Status Time
2.1-Workflow-ML.ipynb ✅ SUCCESS 6.2s
2.2-Descente-de-gradient.ipynb ✅ SUCCESS 4.4s
2.3-Regression-lineaire-logistique.ipynb ✅ SUCCESS 4.1s
2.4-Arbres-Forets-Ensembles.ipynb ✅ SUCCESS 5.0s
Search-1-StateSpace.ipynb ✅ SUCCESS 4.0s
SL-1-LogicalLearning.ipynb ✅ SUCCESS 3.1s
rl_4_multi_armed_bandits.ipynb ✅ SUCCESS 25.8s
GameTheory-4c-NashExistence-Python.ipynb ✅ SUCCESS 6.7s

Pinned lockfile: scripts/notebook_tools/golden_set.lock.txt (H.7 P3, axe A #4208)

@jsboige
jsboige merged commit 11a523f into main Jul 24, 2026
27 of 28 checks passed
jsboige pushed a commit that referenced this pull request Jul 24, 2026
… c.844/c.845/c.847 omissions) (#8322)

Sub-grain sha-only-rebaseline of MY OWN omissions from c.844 (PyMC-19 citations #8302),
c.845 (Infer-18 citations #8307), and c.847 (PyMC-18 citations #8314). All 3 PRs MERGED
on main without rebaselining the twin_pairs.yaml sha → 4 sha stale on Probas-18 (Python+
C#) + Probas-19 (Python). Verified firsthand via git ls-tree HEAD, zero content asymmetry
(triage jsboige OWNER #8264 comment 3, 2026-07-24T10:15Z).

Scope: ONLY MY entries (Probas-18, Probas-19). NOT touching Probas-15 (jsboige CAP #8280)
nor ML-7 (po-2024 CAP #8284) — G-VAR-2 batch-rebaseline = ai-01 CAP.

Method: byte-surgical +5/-5 hand-edit on twin_pairs.yaml (L963 ★★★, NOT
check_twin_parity.py --update which churns YAML +298 lines).

Validation: check_twin_parity.py --check: OK=36 DRIFT=3 (was OK=36 DRIFT=3; my 2 pairs
moved DRIFT→OK, 2 NEW DRIFTs appeared from jsboige/po-2024 work = their CAP).

See #8264. See #8057.

Co-authored-by: myia-po-2023 <po-2023@myia.ai>
Co-authored-by: Claude-Code <noreply@anthropic.com>
jsboige added a commit that referenced this pull request Jul 28, 2026
…MBML/Pearl/Kschischang-Bishop) (#8651)

* docs(probas,#8081): add canonical citations to PyMC-3 Factor-Graphs (MBML / Pearl / Kschischang-Bishop)

PyMC-3 (Murder Mystery / factor graphs) was the residual of the #8081 Probas
citation-distillation rollout: PyMC-15/16/17/18/19 all anchored in prior cycles
(#8302/#8314/#8334/#8339/#8348), but PyMC-3 carried zero canonical citations
despite being built on MBML's flagship example (verified firsthand).

Adds 4 inline citation blockquotes (PyMC-18 #8314 format), one per conceptually-
relevant section:
- section 1 Murder Mystery -> Winn & Bishop (2019), Model-Based Machine Learning, Ch.1.
- section 2 Explaining Away -> Pearl (1988), Probabilistic Reasoning, section 3.3 (collider).
- section 3 Monty Hall -> vos Savant (1990) / Gill (2011, Comptes Rendus Mathematiques).
- Conclusion factor graphs + sum-product -> Kschischang-Frey-Loeliger (2001, IEEE TIT
  47(2):498-519) + Bishop (2006) PRML section 8.4, with the EP-vs-MCMC mapping.

Markdown-only (C.3 exception, no re-exec): code cells byte-identical (source +
outputs + execution_count 1-8, verified canonical-JSON deep compare, 0 changed).
Exactly 4 markdown cells changed [2,8,10,17]. +13/-3 diff is benign nbformat
line-wrap normalization (no content loss). nbformat VALID, LF-only 0 CR. Catalogue
byte-identical. Format matches precedent (French-accented blockquotes, PyMC-18 style).

See #8081 (Probas distillation audit, partial - closes PyMC-3 residual).
See #4956 (twin marathon - Infer-3 <-> PyMC-3 registered semantic twin).

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

* chore(twin-register,#8651): rebaseline Probas-3 python_sha after citation PR

Markdown citation edit (PR #8651) moved the PyMC-3 Factor-Graphs blob SHA
(9f0c7a4 -> 3e358b9); the twin-parity registry lagged, tripping the only
red check (Twin parity audit #8057). Rebaseline via check_twin_parity --update;
known_differences left untouched (the source-attribution gap is closing, not
widening -- ai-01 c.28 review). DRIFT=0 after rebaseline (123 OK).

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

---------

Co-authored-by: po-2024-worker <ai@myia.fr>
Co-authored-by: Claude-Code <noreply@anthropic.com>
@jsboige
jsboige deleted the feature/c844-pymc19-citations-8081 branch September 2, 2026 13:14
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.

docs(probas,#8081): sub-issue batch citations canoniques — Infer-11 + PyMC-11 + Infer-12 + Infer-2 + PyMC-2

2 participants