成分混合を使ってマルチモーダルデータをモデル化する
いくつかのカーネル密度推定を使って,間欠泉噴出までの待ち時間と推定母数について混合成分数を見極め,データをガンマ分布の混合にフィットさせる.
waiting = ExampleData[{"Statistics", "OldFaithful"}][[All, 2]];mdist = MixtureDistribution[{1 / 3, 2 / 3}, {GammaDistribution[a, b], GammaDistribution[c, d]}];
edist = EstimatedDistribution[waiting, mdist, {{a, 80}, {b, .5}, {c, 200}, {d, 0.5}}];dp = DiscretePlot[PDF[EmpiricalDistribution[waiting], x], {x, DeleteDuplicates[waiting]}, Filling -> Axis, PlotRange -> {{35, 100}, All}, AxesOrigin -> {35, 0}, PlotStyle -> Darker@Hue[.908667, .7, .7]];
{Show[dp, Map[SmoothHistogram[waiting, #, PlotRange -> {{35, 100}, All}, PlotStyle -> Darker@Hue[.908667, .7, .7]]&, {{"Adaptive", Automatic, 1}, "SheatherJones", "LeastSquaresCrossValidation", "Oversmooth"}]], Show[dp, Plot[PDF[edist, x], {x, 0, 100}, PlotStyle -> {{Darker@Hue[.908667, .7, .7], Thick}}, Filling -> Axis, FillingStyle -> Directive[Opacity[.2], Hue[.908667, .7, .7]], PlotRange -> {{35, 100}, All}]]}//GraphicsRow