label_onehot: one-hot code the label vector

View source: R/evaluation_functions.R

label_onehotR Documentation

one-hot code the label vector

Description

one-hot code the label vector

Usage

label_onehot(labels, K = NULL)

Arguments

labels

a vector of labels

K

number of different categories, by default is the number of unique labels

Value

a n-by-K one-hot encoded binary matrix


pengminshi/MRtree documentation built on March 6, 2023, 4:20 p.m.