one_hot: one_hot

Description Usage Arguments Value

View source: R/util.R

Description

utility function to encode indices in a binary vector

Usage

1
one_hot(p, n_var)

Arguments

p

a list like the result of random_selection_regression

n_var

the total number of indices

Value

a binary vector of length n_var with elements equal to 1 for the indices in p$indices


Skjemaa/GA documentation built on May 3, 2019, 6:42 p.m.