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 into the nearest matrix of (0,1) indicator variables.

Usage

map(Y)

Arguments

Y

A matrix (for example a matrix of conditional probabilities in which each row sums to 1).

Value

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

References

C. Fraley and A. E. Raftery (2002). Model-based clustering, discriminant analysis, and density estimation. Journal of the American Statistical Association 97:611-631.

C. Fraley, A. E. Raftery, T. B. Murphy and L. Scrucca (2012). mclust Version 4 for R: Normal Mixture Modeling for Model-Based Clustering, Classification, and Density Estimation. Technical Report No. 597, Department of Statistics, University of Washington.

See Also

Examples

data(nutrimouse)
Y = unmap(nutrimouse$diet)

map(Y)

mixOmics

Omics Data Integration Project

v6.14.1
GPL (>= 2)
Authors
Kim-Anh Le Cao [aut, cre], Florian Rohart [aut], Ignacio Gonzalez [aut], Sebastien Dejean [aut], Al Abadi [ctb], Benoit Gautier [ctb], Francois Bartolo [ctb], Pierre Monget [ctb], Jeff Coquery [ctb], FangZou Yao [ctb], Benoit Liquet [ctb]
Initial release
2021-04-11

We don't support your browser anymore

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