map: Map matrix of probabilities to class assignments.

Description Usage Arguments Value Author(s) Examples

View source: R/SetMethods.R

Description

Traverse the rows of a matrix of probabilities of size n x k, where the n rows are samples, and the k columns are the probability of assignment of the sample to each of k classes. The most probable class assignment is selected for each row and a vector of classes is returned.

Usage

1
map(z, ...)

Arguments

z

A matrix of probabilities.

...

Additional arguments, not currently used.

Value

A vector of class assignments of lenght n.

Author(s)

Greg Finak <greg.finak@ircm.qc.ca>, Raphael Gottardo <raphael.gottardo@ircm.qc.ca>

Examples

1
2
z<-t(apply(t(replicate(100,rgamma(5,0.1,1))),1,function(x)x/sum(x)));
map(z);

flowMerge documentation built on Nov. 8, 2020, 8:08 p.m.