select_max: select maximum

Description Usage Arguments Details Value Author(s) Examples

Description

This function select the class with highest probability in a sample. If multiple classes have the same heighest probability then one is randomly chosen

Usage

1

Arguments

x

a vector with sample predictions: the elements represent the classes of outcomes.

Details

helper function for the tutorial

Value

returns a vector with the following elements:

Author(s)

Bob Douma

Examples

1
2
3
library(gtools)
pred = rdirichlet(100, c(0.1,0.1,0.5,0.5)) # generate multinomial probabilties with four classes
pred.bin = multinomialperform:::prob_to_binary(pred)

bobdouma/kappa_multinomial documentation built on May 12, 2019, 11:28 p.m.