oneHot function
one hot encoding of a matrix
valueThe value to encodesizeThe size of the matrix- Returns The new matrix
Implementation
Matrix oneHot(int value, int size) {
Matrix matrix = zeros(1, size);
matrix.setAt(0, value, value: 1);
return matrix;
}