Repository navigation
Conversation
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 #1562 +/- ##
==========================================
+ Coverage 94.59% 94.76% +0.16%
==========================================
Files 98 98
Lines 6233 6318 +85
Branches 799 804 +5
==========================================
+ Hits 5896 5987 +91
+ Misses 216 212 -4
+ Partials 121 119 -2
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:
|
|
i'm leaning towards mack's caution being too in-depth for docstrings. i also think a caution is more persuasive when accompanied by a concrete example. historically we've approached this via either the user guide or the example gallery. |
The example simulates triangles with no calendar-year effect and counts how often ValuationCorrelation flags them at p_critical=0.1. At least one diagonal is flagged in about 15% of 10-year triangles and 77% of 30-year triangles, while the total test stays near 10%. The tail_sample paid triangle shows the two forms disagreeing on real data. Developed with an AI assistant (Árbol, running Muse).
Name total=True as the default, say that a pass does not prove there is no calendar-year effect, and link the gallery example that compares the per-diagonal and total forms. Developed with an AI assistant (Árbol, running Muse).
Developed with an AI assistant (Árbol, running Muse).
6ddf178 to
fbfd709
Compare
|
Agreed. I moved the caution into a gallery example, "Calendar Year Tests" ( (This comment was made with Árbol, an AI assistant, under my direction.) |
|
i'm good with the docstring changes. on the top half of the notebook, i'm thinking we can leverage the recently implement triangle.styler to make it really pop. can you use color coding to help the read visualize the S's and L's of the tail_sample triangle? i have an inkling that it will make the 2008 calendar year easily stand out. on the bottom half of the notebook, i'm wondering if we can take the same premise about too many diagonals and make it about triangle grain. for example, take the prism triangle, take random samples of it (the dataset is at a claim level), then compare the quarterly, semiannual, and annual grains across all samples. |
The top half of the calendar-year gallery example now shows the S and L marks of the tail_sample paid triangle with Triangle.style, letters kept in the cells. The 2008 diagonal holds six L marks, two medians and no S. The bottom half replaces the simulated triangles with prism: the claims are split at random into 100 samples, and each sample's paid triangle is tested at annual, semiannual and quarterly grain. At least one diagonal is flagged in 12, 49 and 77 of the 100 samples, while the total test flags 12, 7 and 11. The docstring's pointer to the example, the card alt text and the thumbnail follow the new content. Developed with an AI assistant (Árbol, running Muse).
|
Thanks, both halves are reworked in 8067896. The top half now styles the The bottom half now uses prism instead of the simulated triangles. It splits the 34,244 claims at random into 100 disjoint samples of 342 or 343 claims (seed 2026) and tests each sample's paid triangle at annual, semiannual and quarterly grain. At least one diagonal is flagged in 12, 49 and 77 of the 100 samples, no single diagonal in more than 10, and the total test flags 12, 7 and 11. Four other seeds, and 50 samples of about 685 claims, show the same rise. The notebook runs in about 21 seconds. Since the simulation is gone, the docstring line that points to the example now says it compares the two forms across grains, and the gallery thumbnail shows the new chart. (This comment was made with Árbol, an AI assistant, under my direction.) |
Summary of Changes
Adds a gallery example, "Calendar Year Tests: Per Diagonal or in Total". It styles the S and L marks of the
tail_samplepaid triangle withTriangle.style, then splits theprismclaims into 100 random samples and counts how oftenValuationCorrelationflags them atp_critical=0.1, per diagonal and in total, at annual, semiannual and quarterly grain. The gallery index and the user guide's correlation section link to it. TheValuationCorrelationdocstring drops the caution and links the example instead, keeping two wording fixes: it namestotal=Trueas the default, and it no longer reads a pass as proof that there is no calendar-year effect.Related GitHub Issue(s)
Follows #1540 and #1544.
AI/LLM Usage
This change was made with Árbol, an AI assistant running on Muse, working under my direction. It wrote the example and the docstring changes, ran the notebook through Jupyter Book and the docstring's doctests locally, and drafted this description. I reviewed the diff before submitting.
Additional Context for Reviewers
The notebook takes about 21 seconds to execute in a local Jupyter Book build.
Submitter's Checklist
[FIX],[FEAT],[DOCS],[TST],[CHORE], or[BRK]).Reviewer's Checklist