Chapter 11 prep#1078
Merged
Merged
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)
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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.