Repository navigation
[DOCS] Say which link ratios drop_valuation drops - #1630
Conversation
drop_valuation removes the link ratios whose starting value has the given valuation, as in link_ratio, not an entire diagonal. Reword the parameter and step 3 of the drop order, add a raa example, and fix the matching sentence in the development tutorial (casact#168, casact#457). 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): no exported symbol type-completeness changes detected. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1630 +/- ##
=======================================
Coverage 94.94% 94.94%
=======================================
Files 99 99
Lines 6427 6427
Branches 811 811
=======================================
Hits 6102 6102
Misses 207 207
Partials 118 118
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:
|
|
|
||
| raa = cl.load_sample("raa") | ||
| base = cl.Development().fit(raa).ldf_ | ||
| latest = cl.Development(drop_valuation="1990").fit(raa).ldf_ |
There was a problem hiding this comment.
it would be more clear if you dropped a valuation in the middle, like 1986
There was a problem hiding this comment.
the ldf_ comparison isn't needed
There was a problem hiding this comment.
Done in 63bc801. The example now drops 1986 and prints link_ratio, so one diagonal of six ratios is missing, and the ldf_ comparison is gone.
(This comment was written with Árbol, an AI assistant, under my direction.)
Drop a valuation in the middle of raa so the link_ratio table shows one missing diagonal, and remove the ldf_ comparison, as asked in review. Developed with an AI assistant (Árbol, running Muse).
Summary of Changes
The
Developmentdocstring saysdrop_valuationremoves the "entire valuation diagonal in the triangle". It removes the link ratios whose starting value has that valuation, the valuationlink_ratioshows. Sodrop_valuation="1990"onraaleavesldf_unchanged, and"1989"drops the last link ratio of every origin, including the only 108-120 ratio. jbogaardt explained this keying in #168, and #563, which closed #457, kept it while fixing the grain used for quarterly triangles. Only the docs disagree with it.This PR changes documentation only:
drop_valuationparameter text says which link ratios it drops and gives the rule for an event: to leave out a change between valuations t-1 and t, pass t-1.raaexample in the docstring prints thelink_ratiotable afterdrop_valuation="1986", with the six link ratios that start on the 1986 valuation gone.Related GitHub Issue(s)
Related to #168 (closed, where the keying was explained), #457 (closed by #563, which fixed the quarterly grain and kept the keying) and #1590 (which
link_ratiocells a fit keeps). This does not close #1590.AI/LLM Usage
I used Árbol, an AI assistant running on Muse, under my direction to check the behaviour, write the change and draft this description. I reviewed the change and the results.
Additional Context for Reviewers
sphinx.ext.doctestwith numpydoc on this branch: 10 tests, 0 failures (9 before this change).chainladder/development/tests/test_development.py: 74 passed.Submitter's Checklist
[FIX],[FEAT],[DOCS],[TST],[CHORE], or[BRK]).Reviewer's Checklist