chainladder.BootstrapODPSample#
- class chainladder.BootstrapODPSample(n_sims=1000, n_periods=-1, hat_adj=True, drop=None, drop_high=None, drop_low=None, drop_valuation=None, random_state=None)#
Class to generate bootstrap samples of triangles. Currently this Only supports ‘single’ triangles (single index and single column).
- Parameters:
- n_sims: int (default=1000)
Number of simulations to generate
- n_periods: integer, optional (default=-1)
number of origin periods to be used in the ldf average calculation. For all origin periods, set n_periods=-1
- hat_adj: bool (default=False)
Adjust standardized Pearson residuals with the hat matrix adjustment factor. If false, Degree of Freedom adjustment is used.
- drop: tuple or list of tuples
Drops specific origin/development combination(s) from residual sample
- drop_high: bool or list of bool (default=None)
Drops highest link ratio(s) from residual sample
- drop_low: bool or list of bool (default=None)
Drops lowest link ratio(s) from residual sample
- drop_valuation: str or list of str (default=None)
Drops specific valuation periods from residual sample. str must be date convertible.
- random_state: int, RandomState instance or None, optional (default=None)
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.
- Attributes:
- resampled_triangles_: Triangle
A set of triangles represented by each simulation
- scale_:
The scale parameter to be used in generating process risk
Methods
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_backend
(backend[, inplace, deep])Converts triangle array_backend.
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.
to_json
()Serializes triangle object to json format
to_pickle
(path[, protocol])Serializes triangle object to pickle.
transform
(X)If X and self are of different shapes, align self to X, else return self.
fit
pipe