Uh oh!
There was an error while loading. Please reload this page.
Chapter 11 prep - #1078
Conversation
restructuring disposal attributes into mixin class
adding `is_disposal_rate` attribute to triangle
improving docstring and adding codecov coverage
Disposal rate method
Weighted regression
* WIP * making progress * promoting _param_property * fixing bug * full implementation w/ test * bugbot and tests * test fix * rubric * docstring and additional tests * bugbot proof * Update test_disposal.py * docstring and additional tests * bugbot proof * Update test_disposal.py * more bugbot fixes * bug fix * fix * forcing numpy after all * more fixes * more fixes * addressing reviewer comments * added missing dependencies * restructuring disposal attributes into mixin class * adding `is_disposal_rate` attribute to triangle * improving docstring and adding codecov coverage * chapter 11 prep * streamlining single dev weights * doctest fixes
Disposal rate method (#1022)
Uh oh!
There was an error while loading. Please reload this page.
Pyright Type CompletenessView the full Project (full
Other symbols referenced but not exported by
Symbols without documentation:
Patch (exported symbols added or changed by this PR): 0.0% fully typed (0 / 3)
Patch symbol details
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## experimental #1078 +/- ##
================================================
- Coverage 89.75% 89.62% -0.14%
================================================
Files 91 91 Lines 5408 5299 -109 Branches 696 673 -23 ================================================
- Hits 4854 4749 -105 + Misses 389 386 -3 + Partials 165 164 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary of Changes
Related GitHub Issue(s)
Additional Context for Reviewers
uv run pytest) and documentation changes (uv run jb build docs --builder=custom --custom-builder=doctest)Note
Medium Risk
Changes to
nan_triangle(dropping theis_patternshortcut) and full-triangleTriangleWeightlogic can alter development/LDF and weighted fits; refreshed sample CSVs will change any test or doc that depended on the old rounded values.Overview
Prepares Friedland textbook workflows (including upcoming Chapter 11) by refreshing bundled sample data and tightening triangle/weighting behavior.
Sample data and manifest: Friedland CSVs are updated with finer paid/reported amounts and new columns (e.g. Reported Claims on
friedland_gl_insurer). The standalonefriedland_xyz_dispdataset is removed from the manifest and deleted; disposal-style figures remain available viafriedland_xyz_auto_bi. Friedland chapters 6–7 doctest outputs are adjusted to match the new numbers.Triangle core:
nan_triangleno longer treats pattern triangles as all-valid; only ultimate triangles still get a full mask._drop_subtrianglesalso clears ndarrayw_weights so copies do not keep stale weight arrays.TriangleWeight:
n_periodsweighting works on full triangles (e.g.full_triangle_) viaX.is_full, using origin slicing instead of valuation filtering. Typing moves toTriangleProtocol; tests coverdrop_valuationexhausting the triangle and parity between standard and full-triangle fits.Weighted regression: Standard OLS uses explicit weighted means for slope/intercept and exposes
rsq_on the fitted model.Reviewed by Cursor Bugbot for commit d22d88d. Bugbot is set up for automated code reviews on this repo. Configure here.