Drop High/Drop Low are not working correctly
See original GitHub issueI get a different answer depending on whether I fit just the work comp LOB vs all LOBs and then slice work comp. These approaches should yield the same answer, but they don’t:
import chainladder as cl
clrd = cl.load_sample('clrd').groupby('LOB')['CumPaidLoss'].sum()
# Passes
assert cl.Development(n_periods=5).fit(clrd).ldf_.loc['wkcomp'] == cl.Development(n_periods=5).fit(clrd.loc['wkcomp']).ldf_
# Fails
assert cl.Development(drop_low=2).fit(clrd).ldf_.loc['wkcomp'] == cl.Development(drop_low=2).fit(clrd.loc['wkcomp']).ldf_
I don’t think this ever worked. The reason is that we only have one 2D (origin x development) matrix of the entries to be dropped. This matrix is shared across all triangles. When dropping using n_periods, drop_valutation, drop_origin, etc, this is fine. But dropping based on link-ratio values it is not.
Issue Analytics
- State:
- Created a year ago
- Comments:14
Top Results From Across the Web
Orthostatic Hypotension - Cleveland Clinic
Orthostatic hypotension causes a sudden drop in blood pressure when you stand up. You may feel dizzy or faint.
Read more >Excel Drop Down List Not Working (8 Issues and Solutions)
In this article, I'll point out 8 significant issues for why the Drop Down list is not working in Excel and also demonstrate...
Read more >Low blood pressure (hypotension) - Symptoms and causes
This drop in blood pressure occurs 1 to 2 hours after eating. It's most likely to affect older adults, especially those with high...
Read more >Video: Drop-down list settings - Microsoft Support
Training: You can use a comma-delimited list, a cell range, or a named range to define the options in a drop -down list....
Read more >When is Low Blood Pressure An Emergency? - K Health
Even a drop of 20 mm Hg within a few minutes can cause dizziness, lightheadedness, and other uncomfortable symptoms.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was with some non-actuaries this weekend, and I expressed some verbal excitement when I saw this issue is being fixed. Even with their desire to join in, the excitement of a working xHiLow average was not easily transferable. Thanks for doing this!
In the code, drop and drop_high/drop_low are applied in parallel. (interestingly enough, drop_above/drop_below are applied after.) Not a difficult thing to put them in any order, but I wonder if the better approach is to allow the practitioner to apply the precise order they want via a pipeline. Unfortunately it looks like Development transformers are memoryless at the moment (see example below).