Repository navigation
[FIX] Size and label TailBondy's fit from the pattern - #1600
Conversation
With Development(groupby=...), ldf_ has one row per group while the triangle keeps one row per company. TailBondy built its starting values from the triangle's row count and labelled b_ with the triangle's index, so the fit failed in concatenate. TailBondy fits only the pattern, so take both from ldf_, as TailCurve does. The grouped fit then matches summing by group before the fit. Closes casact#1599. Developed with an AI assistant (Árbol, running Muse).
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 / 1)
Patch symbol details
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1600 +/- ##
=======================================
Coverage 94.84% 94.84%
=======================================
Files 99 99
Lines 6424 6425 +1
Branches 811 811
=======================================
+ Hits 6093 6094 +1
Misses 212 212
Partials 119 119
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:
|
|
everything looks good. i'm away from my ide atm. i just need to run the test on main to ensure that it fails and i can approve. have you tried to add a Development(groupby) into the big pipeline test in test_workflow? i wonder what else would fail |
Summary of Changes
TailBondynow sizes its starting values and labelsb_fromldf_, asTailCurvedoes. WithDevelopment(groupby=...),ldf_has one row per group while the triangle keeps one row per company, soTailBondybuilt its starting values with one row per company and its data with one row per group, andconcatenatefailed (#1599).test_bondy_fits_grouped_development_patternfitsTailBondyonclrd'sCumPaidLossafterDevelopment(groupby="LOB")and checks thatldf_andb_match the fit on the triangle summed by line first.Related GitHub Issue(s)
Fixes #1599
AI/LLM Usage
This change was made with Árbol, an AI assistant running on Muse, working under my direction. It found the bug, wrote the change and the test, ran the checks below and drafted this description.
Additional Context for Reviewers
TailClarkfails on the same grouped pattern for a different reason: it refitsClarkLDFon every company. This PR leaves it alone. [BUG] TailBondy fails on a pattern fit with Development(groupby=...) #1599 describes it, and it looks like the reverse of [BUG] TailClark fails when X narrows from ldf_ #1432.bondy.py, and the two changes merge without conflict in that file.concatenateValueError and passes with the change.The
chainladder/tailstests (58 passed) and the other test files that useTailBondy(methods/tests/test_predict.py,tests/test_public_api.pyandworkflow/tests/test_workflow.py, 229 passed) pass with the uv.lock versions (numpy 2.3.3, pandas 2.3.3), and ruff 0.16.1 check and format are clean.Submitter's Checklist
[FIX],[FEAT],[DOCS],[TST],[CHORE], or[BRK]).Reviewer's Checklist