Learn R Programming

glmnet (version 4.1-8)

rmult: Generate multinomial samples from a probability matrix

Description

Generate multinomial samples

Usage

rmult(p)

Value

a vector of class memberships

Arguments

p

matrix of probabilities, with number of columns the number of classes

Author

Trevor Hastie
Maintainer: Trevor Hastie hastie@stanford.edu

Details

Simple function that calls the rmultinom function. It generates a class label for each row of its input matrix of class probabilities.