Replies: 3 comments
-
You can call import chainladder as cl
xyz = cl.load_sample("xyz")
# Non-sampled CDFs
cl.Development(drop_high=True, drop_low=True,average='volume').fit(xyz["Incurred"]).cdf_
# Sampled CDFs
xyz_tri_sampled = (
cl.BootstrapODPSample(n_sims=10000).fit(xyz["Incurred"]).resampled_triangles_
)
cl.Development(drop_high=True, drop_low=True,average='volume').fit(xyz_tri_sampled).cdf_.mean() |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you Kenneth! I actually figured this out yesterday , but I couldn’t figure out how to apply these CDFs to my latest diagonal to get my ultimates. I realize that there is one less CDF than diagonals but still couldn’t figure it out On Nov 5, 2023, at 1:59 AM, Kenneth S. Hsu ***@***.***> wrote:
You can call .mean() directly on samples_cdf.
import chainladder as cl
xyz = cl.load_sample("xyz")
# Non-sampled CDFs
cl.Development(drop_high=True, drop_low=True,average='volume').fit(xyz["Incurred"]).cdf_
# Sampled CDFs
xyz_tri_sampled = (
cl.BootstrapODPSample(n_sims=10000).fit(xyz["Incurred"]).resampled_triangles_
)
cl.Development(drop_high=True, drop_low=True,average='volume').fit(xyz_tri_sampled).cdf_.mean()
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Use the Following on from Kenneth's example: import chainladder as cl
xyz = cl.load_sample("xyz")
# Non-sampled CDFs
cl.Development(drop_high=True, drop_low=True,average='volume').fit(xyz["Incurred"]).cdf_
# Sampled CDFs
xyz_tri_sampled = (
cl.BootstrapODPSample(n_sims=10000).fit(xyz["Incurred"]).resampled_triangles_
)
pipe = cl.Pipeline(
[('dev', cl.Development(drop_high=True, drop_low=True,average='volume')),
('model', cl.Chainladder())]).fit(xyz_tri_sampled)
pipe.predict(xyz["Incurred"]).ultimate_.mean() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a triangle object with a shape of (10000,1,1,26) which holds 10,000 simulations of CDFs using a bootstrap simulation. How do I calculate the average factor at each age, and then apply it to the latest diagonal to create my ultimate and ibnr estimations?
My variable name for the array is named samples_cdf, which I define as
samples_cdf = cl.Development(drop_high=True, drop_low=True,average='volume').fit(samples).cdf_
samples_cdf
Beta Was this translation helpful? Give feedback.
All reactions