I like to use randomforest
in R, but i get a category with more than 100 levels, so, i can't use randomforest directly.
I like to change the variable with the categories into a matrix with binary values (con column for category an values true/false).
Is there any function to do this directly?
Original column
1
2
3
4
4
Target columns
1 2 3 4
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
0 0 0 1
Kind regards.