sparse_encode: Sparse encoding

View source: R/deepDummy.r

sparse_encodeR Documentation

Sparse encoding

Description

Sparse encoding

Usage

sparse_encode(x)

Arguments

x

A vector with values (levels) of a categorical variable.

Value

An array with numeric encoded levels of x.

See Also

one_hot_encode.

Other Dummifying: append_rows(), dummify(), dummify_multilabel(), effectcoding(), one_hot_decode(), one_hot_encode(), remove_columns(), resample_imbalanced()

Examples

  x <- factor(sample(lvls <- c("dog", "cat", "mouse"), 10, TRUE), levels = lvls)
  sparse_encode(x)


stschn/deepANN documentation built on June 25, 2024, 7:27 a.m.