Repository navigation
Conversation
…act#1667) _include_process_variance draws gamma noise for every future cell but kept only the last column as ultimate_. full_triangle_ then rebuilt the interior cells from the expected pattern, so the cell-level noise from Shapland and Leong was lost. The fitted model now keeps the noisy triangle it draws and full_triangle_ returns a copy of it. ultimate_, ibnr_ and observed cells do not change. A fit without process variance and a refit on a plain triangle fall back to the expected completion. Closes casact#1667. Developed with an AI assistant (Árbol, running Muse).
scks1
requested review from
genedan,
henrydingliu and
kennethshsu
as code owners
November 25, 2026 08:08
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 / 4)
Patch symbol details
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1710 +/- ##
=======================================
Coverage 95.21% 95.22%
=======================================
Files 100 100
Lines 6604 6611 +7
Branches 831 832 +1
=======================================
+ Hits 6288 6295 +7
Misses 200 200
Partials 116 116
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.
Closes #1667.
After a fit on
BootstrapODPSampletriangles,full_triangle_now returns the path the fit simulated._include_process_variancekeeps the noisy triangle it draws, andMethodBase.full_triangle_returns a copy of it. Every future cell then carries its own process variance, as in Shapland and Leong. Before this change only the last column did.ultimate_,ibnr_and the observed cells stay the same. A fit with no process variance buildsfull_triangle_from the expected pattern as before. A refit on a plain triangle drops the stored path.The triangle that
predictreturns keeps today'sfull_triangle_. Storing the path on a Triangle would carry it through copies and arithmetic, which is the problem #1706 tracks. So this PR stays with the fitted model.Three new tests in
test_predict.pycover the simulated path, the plain fit and the refit. Two of them fail on main. The full suite gives 1829 passed and 9 skipped on this branch, against 1823 passed and 9 skipped on main at 0f4b230.ruff formatandruff checkpass on both changed files.Snippet, run on this branch
Output:
This change was made with Árbol, an AI assistant running on Muse, working under my direction. It wrote the fix and the tests, ran the checks above and drafted this description.