Function to convert sequences of (Index, Value) tuples into a compressed sparse vector
Function to convert sequences of (Index, Value) tuples into a compressed sparse vector
Input sequence containing tuples of indicies and values
the vector representation of those values
Function to reindex a sequence of vectorized categoricals or maps when flattening
Function to reindex a sequence of vectorized categoricals or maps when flattening
sequence of all previous vectorized values
next index for concatenating the sequence
Create a one-hot vector
Create a one-hot vector
position to put 1.0 in the vector
size of the one-hot vector
one-hot vector with 1.0 in position value
Function to flatten sequences of (Index, Value) tuples and reindex them sequentially Example: > reindex(Seq(Seq((0,2.0), (1,1.0)), Seq((0,2.0), (5,1.0)))) res: Seq((0,2.0), (1,1.0), (2,2.0), (7,1.0))
Function to flatten sequences of (Index, Value) tuples and reindex them sequentially Example: > reindex(Seq(Seq((0,2.0), (1,1.0)), Seq((0,2.0), (5,1.0)))) res: Seq((0,2.0), (1,1.0), (2,2.0), (7,1.0))
sequence to flatten
flattened and reindex values