chainladder.Trend#
- class chainladder.Trend(trends=0.0, dates=None, axis='origin')#
Estimator to create and apply trend factors to a Triangle object. Allows for compound trends as well as storage of the trend matrix to be used in other estimators, such as CapeCod.
- Parameters:
- trends: list-like
The list containing the annual trends expressed as a decimal. For example, 5% decrease should be stated as -0.05
- dates: list of date-likes
A list-like of (start, end) dates to correspond to the trend list.
- axis: str (options: [‘origin’, ‘valuation’])
The axis on which to apply the trend
- Attributes:
- trend_:
A triangle representation of the trend factors
Methods
fit
(X[, y, sample_weight])Fit the model with X.
fit_transform
(X[, y])Fit to data, then transform it.
get_metadata_routing
()Get metadata routing of this object.
get_params
([deep])Get parameters for this estimator.
set_fit_request
(*[, sample_weight])Request metadata passed to the
fit
method.set_output
(*[, transform])Set output container.
set_params
(**params)Set the parameters of this estimator.
set_transform_request
(*[, sample_weight])Request metadata passed to the
transform
method.to_json
()Serializes triangle object to json format
to_pickle
(path[, protocol])Serializes triangle object to pickle.
transform
(X[, y, sample_weight])If X and self are of different shapes, align self to X, else return self.