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

map

Classification given Probabilities


Description

Converts a matrix in which each row sums to 1 to an integer vector specifying for each row the column index of the maximum.

Usage

map(z, warn = mclust.options("warn"), ...)

Arguments

z

A matrix (for example a matrix of conditional probabilities in which each row sums to 1 as produced by the E-step of the EM algorithm).

warn

A logical variable indicating whether or not a warning should be issued when there are some columns of z for which no row attains a maximum.

...

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

Value

A integer vector with one entry for each row of z, in which the i-th value is the column index at which the i-th row of z attains a maximum.

See Also

Examples

emEst <- me(modelName = "VVV", data = iris[,-5], z = unmap(iris[,5]))

map(emEst$z)

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.