MakeOneHot

class behavenet.data.transforms.MakeOneHot[source]

Bases: Transform

Turn a categorical vector into a one-hot vector.

Methods Summary

__call__(sample)

Assumes that K classes are identified by the numbers 0:K-1.

Methods Documentation

__call__(sample)[source]

Assumes that K classes are identified by the numbers 0:K-1.

Parameters:

sample (np.ndarray) – input shape is (time)

Returns:

output shape is (time, K)

Return type:

np.ndarray