Learn R Programming

multiclassPairs (version 0.4.3)

group_TSP: Internal function: for grouping labels for one-vs-rest usage

Description

Used to convert labels to factor to be used by switchBox package.

Usage

group_TSP(label, my_group)

Arguments

label

a vector indicating multi classes

my_group

character indicate the wanted class

Value

a factor contains two levels one is the wanted class and the other is "rest" that represent any other class other than the wanted class

Examples

Run this code
# NOT RUN {
L <- sample(x = c("A","B","C","D"), size = 1000, replace = TRUE)

# }

Run the code above in your browser using DataLab