ohe {causalBatch}R Documentation

A utility to one-hot encode a treatment vector.

Description

A utility to one-hot encode a treatment vector.

Usage

ohe(Ts)

Arguments

Ts

[n] the labels of the samples, with K < n levels, as a factor variable.

Value

[n, K] a one-hot encoding of Ts.

Author(s)

Eric W. Bridgeford


[Package causalBatch version 1.2.0 Index]