Repository navigation
[DOCS] Warn that virtual columns have limited support - #1632
Conversation
Adds a warning to the Virtual Columns section of docs/user_guide/triangle.ipynb. Estimators such as Development and Chainladder do not evaluate virtual columns, so their results for a virtual column are all NaN, with no warning. The link_ratio and age_to_age properties apply the column's expression to the link ratios of the other columns, which matches the column's own link ratios for a quotient such as PaidLossRatio but not for a difference of two columns. Selecting the column first returns an ordinary Triangle. Refs casact#1607. 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 #1632 +/- ##
=======================================
Coverage 95.00% 95.00%
=======================================
Files 100 100
Lines 6461 6461
Branches 820 820
=======================================
Hits 6138 6138
Misses 204 204
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:
|
| "metadata": {}, | ||
| "source": [ | ||
| "```{warning}\n", | ||
| "Virtual columns have limited support. Estimators such as `Development` and\n", |
There was a problem hiding this comment.
let's keep it simple. just the first two sentences from this paragraph are plenty.
There was a problem hiding this comment.
Trimmed to the first two sentences in ba76b24.
(This comment was written with Árbol, an AI assistant, under my direction.)
The warning now says only that estimators such as Development and Chainladder do not evaluate virtual columns and return all-NaN results for them. The link-ratio caveat and the select-first tip are dropped, as asked in review; casact#1607 still covers the link-ratio behavior. Developed with an AI assistant (Árbol, running Muse).
Summary of Changes
Adds a warning to the Virtual Columns section of
docs/user_guide/triangle.ipynb, after the example of a virtual column that references a missing column. It says that estimators such asDevelopmentandChainladderdo not evaluate virtual columns, so their results for a virtual column are all NaN, with no warning.No code changes.
Related GitHub Issue(s)
Refs #1607. This is the docs-only first step suggested there. It does not fix the bug, so the issue stays open.
AI/LLM Usage
I drafted this change with Árbol, an AI assistant (running Muse). It checked each claim in the warning on main c113fd9, with
raaand with theclrdexample from the guide, on the numpy and sparse backends. I reviewed the text before opening the PR.Additional Context for Reviewers
On main c113fd9, on both backends,
cum_to_incr,dev_to_val,latest_diagonal, arithmetic, slicing andto_frameevaluate a virtual column correctly, so the warning names only estimators. The link-ratio results below are not in the warning and stay with #1607. Forclrd.sum()withCaseReserves = IncurLoss - CumPaidLossas a virtual column,link_ratio["CaseReserves"]starts at -0.9708 for the first origin, against 0.572 from["CaseReserves"].link_ratio; forPaidLossRatiothe two agree. Onraa, a virtualvalues - halfgives a link ratio of 0 everywhere, which the Triangle shows as NaN. The new cell merges cleanly with #1620, the other open PR that editstriangle.ipynb.Submitter's Checklist
[FIX],[FEAT],[DOCS],[TST],[CHORE], or[BRK]).Reviewer's Checklist