chainladder.CapeCod

Contents

chainladder.CapeCod#

class chainladder.CapeCod(trend=0, decay=1, n_iters=1, apriori_sigma=0.0, random_state=None, groupby=None)#

Applies the CapeCod technique to triangle X

Parameters:
trend: float (default=0.0)

The cape cod trend assumption. Any Trend transformer on X will override this argument.

decay: float (defaut=1.0)

The cape cod decay assumption

n_iters: int, optional (default=1)

Number of iterations to use in the Benktander model.

apriori_sigma: float, optional (default=0.0)

Standard deviation of the apriori. When used in conjunction with the bootstrap model, the model samples aprioris from a lognormal distribution using this argument as a standard deviation.

random_state: int, RandomState instance or None, optional (default=None)

Seed for sampling from the apriori distribution. This is ignored when using as a deterministic method. If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by np.random.

groupby:

An option to group levels of the triangle index together for the purposes of deriving the apriori measures. If omitted, each level of the triangle index will receive its own apriori computation.

Attributes:
triangle:

returns X

ultimate_:

The ultimate losses per the method

ibnr_:

The IBNR per the method

apriori_:

The trended apriori vector developed by the Cape Cod Method

detrended_apriori_:

The detrended apriori vector developed by the Cape Cod Method

Methods

fit(X[, y, sample_weight])

Fit the model with X.

get_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

intersection(a, b)

Given two Triangles with mismatched indices, this method aligns their indices

predict(X[, sample_weight])

Predicts the CapeCod ultimate on a new triangle X

set_backend(backend[, inplace, deep])

Converts triangle array_backend.

set_fit_request(*[, sample_weight])

Request metadata passed to the fit method.

set_params(**params)

Set the parameters of this estimator.

set_predict_request(*[, sample_weight])

Request metadata passed to the predict method.

to_json()

Serializes triangle object to json format

to_pickle(path[, protocol])

Serializes triangle object to pickle.

fit_predict

pipe

validate_X

validate_weight