<- Previous: Univariate Distributions | Back to Index | Next: Competing Risks ->
MixtureModel represents a weighted mixture of flood-generating populations. It is appropriate when observations may arise from different physical populations, such as rainfall floods and snowmelt floods.
For component distributions F_k with weights w_k,
The corresponding density is
BestFit evaluates this through Numerics.Distributions.Mixture. The model parameter vector contains component distribution parameters plus mixture weights; SetParameterValues(...) pushes those values into the Numerics mixture before likelihood evaluation.
For exact data, the contribution is the log density of the mixture at the observed value. Uncertain, interval, and threshold observations follow the same BestFit data-type semantics as UnivariateDistribution, but the density and CDF calls are made on the configured mixture distribution. PointwiseDataLogLikelihood(...) preserves that same decomposition for WAIC, LOO-CV, and diagnostics.
| API | Purpose |
|---|---|
MixtureModel |
Model-layer mixture distribution |
MixtureAnalysis |
Bayesian workflow for the mixture model |
Parameters |
Component parameters plus mixture weights |
DataLogLikelihood(...) |
Mixture likelihood for BestFit data types |
GenerateRandomValues(...) |
Simulates from the weighted mixture |
SetParameterValues(...) |
Updates component parameters and weights |
using RMC.BestFit.Analyses;
using RMC.BestFit.Models;
var model = new MixtureModel();
var analysis = new MixtureAnalysis(model);
analysis.BayesianAnalysis.Iterations = 5000;
analysis.BayesianAnalysis.WarmupIterations = 2500;
var validation = analysis.Validate();
if (validation.IsValid)
{
await analysis.RunAsync();
}Mixture weights represent the probability that a future event belongs to each latent population. They do not represent the probability of simultaneous processes; use Competing Risks for annual maxima formed from multiple concurrent processes.
The current implementation supports one to three component distributions. Parameter priors are evaluated component-by-component. When Jeffreys scale priors are enabled, BestFit applies the scale-parameter penalty for each component distribution that exposes a scale parameter. Quantile priors are evaluated on the mixture quantile rather than on individual component quantiles.
Primary source paths: src/RMC.BestFit/Models/UnivariateDistribution/MixtureModel.cs, src/RMC.BestFit/Analyses/Univariate/MixtureAnalysis.cs, and src/RMC.BestFit/Models/UnivariateDistribution/UnivariateDistributionModelBase.cs.
[1] G. McLachlan and D. Peel, Finite Mixture Models. New York, NY, USA: Wiley, 2000.
<- Previous: Univariate Distributions | Back to Index | Next: Competing Risks ->