Skip to content

[DOCS] Warn that virtual columns have limited support - #1632

Merged
henrydingliu merged 2 commits into
casact:mainfrom
scks1:docs-virtual-column-limits-1607
Nov 17, 2026
Merged

henrydingliu merged 2 commits into
casact:mainfrom
scks1:docs-virtual-column-limits-1607

Conversation

@scks1

@scks1 scks1 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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 as Development and Chainladder do 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 raa and with the clrd example 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 and to_frame evaluate a virtual column correctly, so the warning names only estimators. The link-ratio results below are not in the warning and stay with #1607. For clrd.sum() with CaseReserves = IncurLoss - CumPaidLoss as a virtual column, link_ratio["CaseReserves"] starts at -0.9708 for the first origin, against 0.572 from ["CaseReserves"].link_ratio; for PaidLossRatio the two agree. On raa, a virtual values - half gives a link ratio of 0 everywhere, which the Triangle shows as NaN. The new cell merges cleanly with #1620, the other open PR that edits triangle.ipynb.

Submitter's Checklist

  • I have reviewed and am adhering to the standards outlined in the project Governing Doc.
  • The PR subject title summarizes the changes, with one proper prefix ([FIX], [FEAT], [DOCS], [TST], [CHORE], or [BRK]).
  • I am a human (not a bot), and this PR form is written by a human.

Reviewer's Checklist

  • The implementation addresses the associated issue(s).
  • The implementation is appropriate, maintainable, and follows ARCHITECTURE.md.
  • PR subject title has the proper prefix and the subject is appropriate.
  • Relevant issue(s) are linked.
  • AI/LLM usage is disclosed and appropriate.
  • Documentation and tests are appropriate.
  • CI tests passed, or any failures are acceptable.
  • Leave a comment with the final recommendation (e.g. approve as is, request a secondary review, or flag an area for more review).

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).
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Pyright Type Completeness

View the full pyright --verifytypes output for this commit

Project (full chainladder package, at this PR's head): 18.1% of exported symbols fully typed (303 / 1674)

Known Ambiguous Unknown Total
Project (head) 303 96 1275 1674

Other symbols referenced but not exported by chainladder: 24

Known Ambiguous Unknown Total
Other (head) 11 1 12 24

Symbols without documentation:

  • Functions without docstring: 330
  • Functions without default param: 0
  • Classes without docstring: 10

Patch (exported symbols added or changed by this PR): no exported symbol type-completeness changes detected.

@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.00%. Comparing base (c113fd9) to head (ba76b24).
⚠️ Report is 1 commits behind head on main.

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           
Flag Coverage Δ
unittests 95.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

"metadata": {},
"source": [
"```{warning}\n",
"Virtual columns have limited support. Estimators such as `Development` and\n",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep it simple. just the first two sentences from this paragraph are plenty.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).
@henrydingliu
henrydingliu merged commit 65b023d into casact:main Nov 17, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants