Skip to content

[DOCS] Restructure the DevelopmentML, TweedieGLM and BarnettZehnwirth user guide - #1744

Open
Abhayindia wants to merge 1 commit into
casact:mainfrom
Abhayindia:docs/restructure-development-ml-1670
Open

Abhayindia wants to merge 1 commit into
casact:mainfrom
Abhayindia:docs/restructure-development-ml-1670

Conversation

@Abhayindia

Copy link
Copy Markdown
Contributor

Part of #1670, taking henrydingliu's three suggestions. I am adhering to the standards in the Governing Doc.

Order: DevelopmentML now comes first as the framework, then TweedieGLM and BarnettZehnwirth as its two common forms. Both do build on it in the code: TweedieGLM wraps a DevelopmentML around a patsy formula and a TweedieRegressor, and BarnettZehnwirth is a TweedieGLM that uses ordinary least squares. Their intros now say so.

Patsy: there is one "Patsy formulas" subsection, under DevelopmentML, which merges the old PatsyFormula subsection with the explanation of R-style formulas. The TweedieGLM "R-style formulas" subsection now points to it and keeps its example cell. I also fixed "that used extensively" in passing.

ODP Chainladder and Origin-varying patterns: the paragraph after the ODP fit promised a comparison with Development but no cell showed one, while "Origin-varying patterns" was where the replication actually happened. The replication now sits in "ODP Chainladder" (the penalized fit, then the alpha=0 fit and "every row matches cl.Development().fit(genins).ldf_"), and "Origin-varying patterns" is only about the drift term and sits at the end of the TweedieGLM section. I checked the numbers the new text relies on: the penalized fit is within 4e-4 of Development and the alpha=0 fit within 8e-7, with identical rows in both.

No code cell was edited, only moved, so the stored outputs travel with them, which is why the diff is large (469 lines, mostly moved cells); the text changes are in 8 markdown cells. pytest --nbmake on the notebook passes in the new order, and ruff format --check and ruff check are clean. I did not build the docs, so the rendered page and its {cite} links are unchecked.

AI disclosure, per the Governing Doc: I used Claude (Claude Code) to help write the edits and this description. I read, ran and checked every part myself before sending it.

@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

Pyright Type Completeness

View the full pyright --verifytypes output for this commit

Project (full chainladder package, at this PR's head): 17.2% of exported symbols fully typed (314 / 1822)

Known Ambiguous Unknown Total
Project (head) 314 102 1406 1822

Other symbols referenced but not exported by chainladder: 24

Known Ambiguous Unknown Total
Other (head) 11 1 12 24

Symbols without documentation:

  • Functions without docstring: 352
  • Functions without default param: 0
  • Classes without docstring: 10

Patch (exported symbols added or changed by this PR): no exported symbol type-completeness changes detected.

@codecov

codecov Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.42%. Comparing base (ebde49b) to head (d2db00f).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1744   +/-   ##
=======================================
  Coverage   95.42%   95.42%           
=======================================
  Files         101      101           
  Lines        6858     6858           
  Branches      860      860           
=======================================
  Hits         6544     6544           
  Misses        199      199           
  Partials      115      115           
Flag Coverage Δ
unittests 95.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant