DevelopmentML#
- class chainladder.DevelopmentML(estimator_ml=None, y_ml=None, autoregressive=False, weighted_step=None, drop=None, drop_valuation=None, fit_incrementals=True)[source]#
A Estimator that interfaces with machine learning (ML) tools that implement the scikit-learn API.
The DevelopmentML estimator is used to generate
ldf_patterns from the data.Added in version 0.8.1.
- Parameters:
- estimator_ml: skearn Estimator
Any sklearn compatible regression estimator, including Pipelines and
- y_ml: list or str or sklearn_transformer
The response column(s) for the machine learning algorithm. It must be present within the Triangle.
- autoregressive: tuple, (autoregressive_col_name, lag, source_col_name)
The subset of response column(s) to use as lagged features for the Time Series aspects of the model. Predictions from one development period get used as featues in the next development period. Lags should be negative integers.
- weight_step: str
Step name within estimator_ml that is weighted
- drop: tuple or list of tuples
Drops specific origin/development combination(s)
- drop_valuation: str or list of str (default = None)
Drops specific valuation periods. str must be date convertible.
- fit_incrementals:
Whether the response variable should be converted to an incremental basis for fitting.
- Attributes:
- estimator_ml: Estimator
An sklearn-style estimator to predict development patterns
- 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:
- XTriangle-like
Set of LDFs to which the estimator will be applied.
- yNone
Ignored, use y_ml to set a reponse variable for the ML algorithm
- sample_weightTriangle-like
Weights to use in the regression
- Returns:
- selfobject
Returns the instance itself.
Inherited Methods
|
Fit to data, then transform it. |
|
Get metadata routing of this object. |
|
Get parameters for this estimator. |
|
|
|
Converts triangle array_backend. |
|
Set output container. |
|
Set the parameters of this estimator. |
|
Serializes triangle object to json format |
|
Serializes triangle object to pickle. |