ClassMode: Determining the mode from a vector of numbers.

Description Usage Arguments Details Value Examples

Description

ClassMode returns the most commonly occurring number from a vector of numbers.

Usage

1
ClassMode(classes)

Arguments

classes

A character vector of elements to find the mode.

Details

ClassMode creates a frequency table based on a vector. This table is then sorted by highest frequency and returns the top element. Note, in the case of a tie, the first element is chosen as opposed to a random tiebreaker or returning both elements. For the sake of developing Random Forests of SDTs, this is a safer option.

Value

The mode found.

Examples

1
2
Input = c("A", "C", "B", "B", "A", "B")
ClassMode(Input)

SoftRandomForest documentation built on May 15, 2019, 5:05 p.m.