aggregate.fft_auto()
The compound distribution by FFT on the grid recommend_grid
Usage
aggregate.fft_auto(
frequency,
severity,
log2=16,
p=Ellipsis,
p_star=Ellipsis,
)chooses, the severity discretized by rounding.
Assumes the claim count independent of the severities and the severities independent and identically distributed. For dependence use fft_bivariate or Clash (two lines hit by the same events), one Count.mixed_poisson on a Mixture (components sharing a mixing variable) or PredictiveDistribution.reorder_groups on simulated totals.
Parameters
frequency: a claim countseverity: a severitylog2: int = 16p: float = 1 - 1e-5p_star: float = 1 - 1e-12
Returns
tuple of (Grid, CompoundReport, GridSize)
Raises
ValueError- As recommend_grid.
Examples
>>> from prospicio.aggregate import fft_auto
>>> from prospicio.distributions import Lognormal, Poisson
>>> agg, report, size = fft_auto(Poisson(5.0), Lognormal.from_mean_cv(100.0, 1.0))
>>> round(agg.mean()), report.aliasing_error < 1e-12(500, True)