Skip to content

fixing triangle.full_expectation_#883

Merged
henrydingliu merged 2 commits into
casact:#882-full-expfrom
henrydingliu:full_expectation
May 30, 2026
Merged

fixing triangle.full_expectation_#883
henrydingliu merged 2 commits into
casact:#882-full-expfrom
henrydingliu:full_expectation

Conversation

@henrydingliu
Copy link
Copy Markdown
Collaborator

@henrydingliu henrydingliu commented May 30, 2026

Summary of Changes

Related GitHub Issue(s)

Additional Context for Reviewers

  • I passed tests locally for both code (uv run pytest) and documentation changes (uv run jb build docs --builder=custom --custom-builder=doctest)

Note

Low Risk
Small property fix in reserve projection helpers with added regression tests; no auth, security, or external API surface changes.

Overview
Fixes full_expectation_ so cumulative vs incremental handling matches full_triangle_: it uses X_.is_cumulative when the fitted estimator has X_, otherwise self.is_cumulative. That corrects full_expectation_ on fit_predict outputs (and similar objects) that are triangles without a separate X_.

Tests now assert full_expectation_ from fit vs fit_predict agree (cumulative and incremental), and numeric comparisons use the shared atol fixture instead of hard-coded 0.00001 thresholds.

Reviewed by Cursor Bugbot for commit 71a8348. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 32cf8e6. Configure here.

Comment thread chainladder/core/tests/test_triangle.py
Comment thread chainladder/core/tests/test_triangle.py Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.05%. Comparing base (449b5c1) to head (71a8348).

Additional details and impacted files
@@              Coverage Diff               @@
##           #882-full-exp     #883   +/-   ##
==============================================
  Coverage          87.04%   87.05%           
==============================================
  Files                 86       86           
  Lines               4986     4989    +3     
  Branches             646      647    +1     
==============================================
+ Hits                4340     4343    +3     
  Misses               456      456           
  Partials             190      190           
Flag Coverage Δ
unittests 87.05% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

@henrydingliu henrydingliu merged commit 91c528d into casact:#882-full-exp May 30, 2026
10 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.

1 participant