onehot_encode: One-hot-encoding of the labels in case of classification

View source: R/utils.R

onehot_encodeR Documentation

One-hot-encoding of the labels in case of classification

Description

One-hot-encoding of the labels in case of classification

Usage

onehot_encode(y)

Arguments

y

a numeric vector consisting of the response variable labels. The minimum value of the unique labels should begin from 0

Examples


library(elmNNRcpp)

y = sample(0:3, 100, replace = TRUE)

y_expand = onehot_encode(y)


elmNNRcpp documentation built on March 18, 2022, 7:26 p.m.