Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

uncerPlot

Uncertainty Plot for Model-Based Clustering


Description

Displays the uncertainty in converting a conditional probablility from EM to a classification in model-based clustering.

Usage

uncerPlot(z, truth, ...)

Arguments

z

A matrix whose [i,k]th entry is the conditional probability of the ith observation belonging to the kth component of the mixture.

truth

A numeric or character vector giving the true classification of the data.

...

Provided to allow lists with elements other than the arguments can be passed in indirect or list calls with do.call.

Details

When truth is provided and the number of classes is compatible with z, the function compareClass is used to to find best correspondence between classes in truth and z.

Value

A plot of the uncertainty profile of the data, with uncertainties in increasing order of magnitude. If truth is supplied and the number of classes is the same as the number of columns of z, the uncertainty of the misclassified data is marked by vertical lines on the plot.

See Also

Examples

irisModel3 <-  Mclust(iris[,-5], G = 3)

uncerPlot(z = irisModel3$z)
 
uncerPlot(z = irisModel3$z, truth = iris[,5])

mclust

Gaussian Mixture Modelling for Model-Based Clustering, Classification, and Density Estimation

v5.4.10
GPL (>= 2)
Authors
Chris Fraley [aut], Adrian E. Raftery [aut] (<https://orcid.org/0000-0002-6589-301X>), Luca Scrucca [aut, cre] (<https://orcid.org/0000-0003-3826-0484>), Thomas Brendan Murphy [ctb] (<https://orcid.org/0000-0002-5668-7046>), Michael Fop [ctb] (<https://orcid.org/0000-0003-3936-2757>)
Initial release
2022-05-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.