DevelopmentConstant#

class chainladder.DevelopmentConstant(patterns=None, style='ldf', callable_axis=0, groupby=None)[source]#
A Estimator that allows for including of external patterns into a

Development style model. When this estimator is fit against a triangle, only the grain of the existing triangle is retained.

Parameters:
patterns: dict or callable

A dictionary key:value representation of age(in months):value. If callable is supplied, callable must return a dict for each element of the callable axis

style: string, optional (default=’ldf’)

Type of pattern given to the Estimator. Options include ‘cdf’ or ‘ldf’.

callable_axis: 0 or 1

If a callable is supplied, the axis, index (0) or column (1) along which to apply the callable. If patterns is not a callable, then this parameter is ignored.

groupby:

option to group levels of the triangle index together for the purposes estimating patterns. If omitted, each level of the triangle index will receive its own patterns.

Attributes:
ldf_: Triangle

The estimated loss development patterns

cdf_: Triangle

The estimated cumulative development patterns

fit(X, y=None, sample_weight=None)[source]#

Fit the model with X. Parameters ———- X : Triangle-like     Set of LDFs to which the munich adjustment will be applied. y : Ignored sample_weight : Ignored Returns ——- self : object     Returns the instance itself.

transform(X)[source]#

If X and self are of different shapes, align self to X, else return self.

Parameters:
XTriangle

The triangle to be transformed

Returns:
X_newNew triangle with transformed attributes.

Inherited Methods

DevelopmentConstant.fit_transform

Fit to data, then transform it.

DevelopmentConstant.get_metadata_routing

Get metadata routing of this object.

DevelopmentConstant.get_params

Get parameters for this estimator.

DevelopmentConstant.pipe

DevelopmentConstant.set_backend

Converts triangle array_backend.

DevelopmentConstant.set_output

Set output container.

DevelopmentConstant.set_params

Set the parameters of this estimator.

DevelopmentConstant.to_json

Serializes triangle object to json format

DevelopmentConstant.to_pickle

Serializes triangle object to pickle.