Diagnostics
MCMCDiagnosticTools.discretediag — Methoddiscretediag(chains::Chains{<:Real}; sections, kwargs...)Discrete diagnostic where method can be [:weiss, :hangartner, :DARBOOT, MCBOOT, :billinsgley, :billingsleyBOOT].
MCMCDiagnosticTools.rstar — Methodrstar(rng=Random.GLOBAL_RNG, classifier, chains::Chains; kwargs...)Compute the $R^*$ convergence diagnostic of the MCMC chains with the classifier.
The keyword arguments supported here are the same as those in rstar for arrays of samples and chain indices.
Examples
julia> using MLJBase, MLJDecisionTreeInterface, Statistics
julia> chains = Chains(fill(4.0, 100, 2, 3));One can compute the distribution of the $R^*$ statistic with the probabilistic classifier.
julia> distribution = rstar(DecisionTreeClassifier(), chains);
julia> isapprox(mean(distribution), 1; atol=0.1)
trueFor deterministic classifiers, a single $R^*$ statistic is returned.
julia> decisiontree_deterministic = Pipeline(
DecisionTreeClassifier();
operation=predict_mode,
);
julia> value = rstar(decisiontree_deterministic, chains);
julia> isapprox(value, 1; atol=0.2)
trueMCMCDiagnosticTools.ess — Methodess(chains::Chains; duration=compute_duration, kwargs...)Estimate the effective sample size.
ESS per second options include duration=MCMCChains.compute_duration (the default) and duration=MCMCChains.wall_duration.
MCMCDiagnosticTools.ess_rhat — Methodess_rhat(chains::Chains; duration=compute_duration, kwargs...)Estimate the effective sample size and the $\widehat{R}$ diagnostic
ESS per second options include duration=MCMCChains.compute_duration (the default) and duration=MCMCChains.wall_duration.
MCMCDiagnosticTools.rhat — Methodrhat(chains::Chains; kwargs...)Estimate the $\widehat{R}$ diagnostic.
MCMCDiagnosticTools.mcse — Methodmcse(chains::Chains; duration=compute_duration, kwargs...)Estimate the Monte Carlo standard error.