How can I do one-hot encoding in MATLAB?
I would like to perform one-hot encoding on the vector [1 7 10 9 8 6]’ with 10 classes (numbers 1 to 10). The resulting 6×10 matrix should have a 1×10 vector in place of each number, with "1" at the position corresponding to the number and "0" at all other positions.I would like to perform one-hot encoding on the vector [1 7 10 9 8 6]’ with 10 classes (numbers 1 to 10). The resulting 6×10 matrix should have a 1×10 vector in place of each number, with "1" at the position corresponding to the number and "0" at all other positions. I would like to perform one-hot encoding on the vector [1 7 10 9 8 6]’ with 10 classes (numbers 1 to 10). The resulting 6×10 matrix should have a 1×10 vector in place of each number, with "1" at the position corresponding to the number and "0" at all other positions. one, hot, encoding, corresponding, number, 1, 0 MATLAB Answers — New Questions









