map: Classification given Probabilities

Description Usage Arguments Value References See Also Examples

View source: R/unmap.R

Description

Converts a matrix in which each row sums to 1 into the nearest matrix of (0,1) indicator variables.

Usage

1
  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

unmap

Examples

1
2
3
4

Example output

Loading required package: MASS
Loading required package: lattice
Loading required package: ggplot2

Loaded mixOmics 6.14.0
Thank you for using mixOmics!
Tutorials: http://mixomics.org
Bookdown vignette: https://mixomicsteam.github.io/Bookdown
Questions, issues: Follow the prompts at http://mixomics.org/contact-us
Cite us:  citation('mixOmics')

 [1] 3 5 5 2 4 1 3 3 2 1 2 4 5 4 5 3 1 2 1 4 1 4 5 2 5 4 4 3 2 3 1 1 4 5 2 1 3 2
[39] 3 5

mixOmics documentation built on June 1, 2018, 5:06 p.m.

Related to map in mixOmics...