Given an array x, say x = [3,1,0,2] – perform one hot encoding. The output looks like this:
Y= [ 0 0 1 0;
0 1 0 0;
0 0 0 1;
1 0 0 0]

Solution Stats

64 Solutions

36 Solvers

Last Solution submitted on Dec 09, 2025

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...