API by task

Use import kernelmix as km and supply inputs as NumPy arrays; pandas is not required. The tutorial shows how the calls form an analysis. The model guide defines the equations and maps their symbols to API names.

An exposure profile is one row of exposure values. Each posterior draw is a set of parameter values sampled from the distribution given the data and priors. Prediction and contrast objects retain draws jointly across profiles, preserving their dependence.

Use the tutorial for a complete analysis and the model guide for equations, assumptions and prior scales.

Task Reference
Fit outcomes and set priors Fit outcomes and set priors
Inspect and save results Inspect and save results
Predict outcomes Predict outcomes
Clusters and survival Clusters and survival
Exposure contrasts and curves Exposure contrasts and curves
Plot and calculate kernels Plot and calculate kernels

Gaussian predictions describe means, probit predictions describe probabilities, and count predictions describe expected counts. Survival predict returns relative hazards; predict_survival returns survival probabilities or hazards. Prediction scales distinguish these outputs.

Outcome Fitting family Main prediction
Continuous gaussian Outcome mean or new observation
Binary binomial Probit probability or zero/one observation
Counts poisson, negative_binomial Expected or sampled counts, with offsets
Event times survival Relative hazard, survival or cause probabilities

Fitting inputs and priors lists required arguments. Structured models adds kernels, clusters and detailed survival records.