-
Notifications
You must be signed in to change notification settings - Fork 91
[Work in progress] BarnettZehnwirth formula helper (with some refactor) #642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…TF_formula. Removes first year's origin trend group, if specified (intercept term takes its place).
…e caution in genral
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## BZ_w_drop #642 +/- ##
=============================================
+ Coverage 85.04% 85.05% +0.01%
=============================================
Files 85 85
Lines 4855 4865 +10
Branches 616 619 +3
=============================================
+ Hits 4129 4138 +9
+ Misses 521 518 -3
- Partials 205 209 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
some recommendations
|
|
@henrydingliu do you want to be the reviewer for this one? |
henrydingliu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please modify the PTF test to use PTF_formula
…e formula for test_bz_2008. Tweaks alpha parameters to be additive again.
|
Done. Also, I changed back how the origin coefficients are fitted. The way PTF_formula fits origin parameters differs from the specification of alphas in the papers. First, we fit an intercept, which seems to me to be a necessary way to get the first alpha, I tried to reformulate things a number of different ways to bring the origin coefficients in line with the paper. I gave up after a few tries, but inadvertently left things so that origin coefficent |
This PR is intended to close #623.
The heavy lifting by @henrydingliu of replicating the model specified in this paper has been generalized and placed into the helper function PTF_formula located in chainladder.utils.utility_functions.
Also, the slapdash multicollinearity warning I added a while ago was removed, because any formula constructed by PTF_formula will trigger it.
Things that aren't done:
coef_aren't so great. I'd like to replace them with numbered alphas, gammas and iotas to make what's going on more obvious. Pandas.DataFrame.rename seemed like the right tool for that job, but I had no luck with it.Things to consider: