Skip to main content
Generated from the package’s Python API. Small, inspectable statistical models with explicit actuarial meanings. Poisson models predict counts, optionally over a supplied exposure. Gamma models predict positive individual claim severities. Both use a log link and numeric features. Both predict individual records; aggregate loss and parameter uncertainty are outside their scope.

ConditionalDistribution

One distribution per successfully predicted record, aligned by identity. Poisson values describe counts over each record’s exposure. Gamma values describe a positive individual severity, one claim at a time.

ConditionalDistribution.mean

Each predicted record’s conditional mean, by identity.

ConditionalDistribution.quantile

Return outcome quantiles of each record’s distribution, as opposed to confidence limits for the fitted mean.

ConditionalDistribution.cdf

Return P(outcome <= value) for every predicted record.

ConditionalDistribution.survival

Return P(outcome > value), retaining accuracy in the upper tail.

ConditionalDistribution.sample

Return independent conditional draws; tuple position is the draw ID. Independence is a sampling convention, separate from any estimated portfolio dependence. Seeds reproduce draws for the same ordered inputs and numerical-library versions. Draws are simulated values, separate from the observed records.

LossEvaluationReport

Holdout diagnostics for one loss model, from evaluate_loss. Totals, mean absolute error and mean deviance cover the records that could be evaluated, unweighted. Every excluded record is in failures with its reason.

LossEvaluationReport.summary

The report as a plain dict, with actual-to-expected, the weighting and the metric denominator spelled out.

LossModel

A Poisson frequency or Gamma severity GLM with a fixed log link. fit returns a new model. Configuration and fitted parameters are immutable. Predictors are explicit numeric columns, used as given, with formulas and learned preprocessing out of scope. Everything a prediction needs lives in the persisted model.

LossModel.fitted

Whether the model has fitted parameters.

LossModel.metadata

What the model is and what its predictions mean: configuration, link, prediction meaning, uncertainty and fit.

LossModel.input_schema

The JSON Schema of one prediction input: each feature, and the exposure.

LossModel.output_schema

The JSON Schema of one prediction: the conditional expected value, in unit.

LossModel.coefficients

The fitted coefficients by name, intercept first.

LossModel.fit

Fit unweighted observations; exposure is an offset, and every observation weighs the same. Missing/invalid observations fail fitting rather than silently changing the training population. Gamma dispersion is the Pearson estimate.

LossModel.call

Predict every input, keeping its ID; a bad input is prediction_failed.

LossModel.save

Save parameters and configuration as plain JSON data, free of executable code.

LossModel.load

Load a local JSON artifact from a file path.

LossResult

Predicted means and conditional distributions, with every input retained.

LossResult.distributions

Each output’s conditional distribution, by output name.

evaluate_loss

Evaluate against caller-selected holdout data; the model keeps its fitted parameters.