Dear friends,
I am not following here. I thought the final output of one hot encoding is a matrix not a row. In other words, you give the the row input like [0 1 2 3 0 2 1], and you wish to have a matrix output.
my code is ---
give a row here, but passes all tests… but again, it gives me error in the
new_y_test = y_test.map(one_hot_matrix)
new_y_train = y_train.map(one_hot_matrix)
So, I think something is not right here even the tests are all passed.