methods.BootstrapResult
What odp_bootstrap() returns: pyarrow Tables with fixed column types.
Usage
methods.BootstrapResult(
method,
as_of,
dev_grain_months,
n_draws,
seed,
central,
origins,
totals,
quantiles,
draws,
residuals
)A missing number is an Arrow null, never NaN. to_polars(name) gives any of the tables as a polars DataFrame.
Attributes
method: str-
The method refitted on every simulated triangle:
"chain_ladder","bornhuetter_ferguson","benktander"or"cape_cod". as_of: datetime.date-
The information date, the evaluation date of the latest cell.
dev_grain_months: int-
Months per development step.
n_draws: int-
The number of simulated run-offs.
seed: int-
The seed the draws came from: the one passed, or, when
seed=Nonewas passed, the fresh entropy drawn for it, so passing it back asseedgives the same draws again. central: ReserveResult-
The point fit: exactly what
methods.<method>returns for the same cells and options. origins: pyarrow.Table-
One row per origin period:
originandorigin_period(as in ReserveResult),latest_dev_lag(int64), latest (the actual latest cumulative),central_ultimateandcentral_ibnr(fromcentral),mean_ibnrandsd_ibnr(the draws’ mean, and their standard deviation withddof=1, null when n_draws is 1) andmean_ultimate(latest + mean_ibnr), all float64. totals: pyarrow.Table-
One row: latest,
central_ultimate,central_ibnr,mean_ibnr,sd_ibnr(null at one draw) andmean_ultimatefor the sum over the origins (float64); n_draws;n_residuals(the residuals resampled);degrees_of_freedom(observed cells minus the ODP model’s parameters, one per origin and one per development age after the first);n_negative_fitted(observed cells whose fitted mean is negative, 0 unlessnegative_increments="reflect");n_draws_unit_factor(draws in which some refitted factor had no positive volume and took 1.0);n_draws_negative_ibnr(draws whose total is below 0);n_draws_tail_fallback(draws whose tail curve failed its checks and used the central fit’s curve), all int64;phi(float64, the Pearson scale); and the optionsresidual_adjustment,residual_pool,negative_incrementsandprocess(string). quantiles: pyarrow.Table-
One row per origin, or the total, and level:
originandorigin_period(null for the total),level(the probability, as passed),ibnr(the quantile of the draws, numpy’s linear rule, which isnp.percentilewith the level times 100 and R’s type 7) andtvar(the mean of the draws at or above that quantile). The total’s rows come first, then each origin’s in origin order, each in the order of the levels. draws: pyarrow.Table-
Every draw of every origin, n_draws times the number of origins rows, draw by draw: draw (int64, from 0),
origin,origin_periodandibnr(float64). A draw’s total is the sum of its rows. residuals: pyarrow.Table-
One row per observed cell, origin by origin:
origin,origin_period,dev_lag(int64),incrementandfitted(float64, the observed and the fitted incremental amount),residual(float64, the unscaled Pearson residual(increment - fitted) / sqrt(|fitted|), null wherefittedis 0),leverage(float64, the cell’s leverage in the ODP GLM, null wherefittedis 0),adjusted(float64, the value resampled from this cell: adjusted, and centred underresidual_pool="centred"; null off the pool),in_pool(bool),reason(string:pooled,leverage_one(a cell fitted exactly, left out underresidual_pool="centred"),zero_fitted_meanorexcluded_link) andlink_reason(string, thelink_ratios.reasonof the link ratio whose development option took the cell out, null otherwise).
Methods
| Name | Description |
|---|---|
| to_polars() | One of the result’s tables as a polars DataFrame. |
to_polars()
One of the result’s tables as a polars DataFrame.
Usage
to_polars(table="origins")table is "origins" (the default), "totals", "quantiles", "draws" or "residuals"; central.to_polars gives the point fit’s. Needs polars: pip install "ibnr[polars]".