Hi, I am new to Alglib and I am trying to use the decision forest class with both predictors and response variables are categorical, i.e strings in C#, I was just wondering how should I form the input dataset. I know that the function requires " double[,] xy" as the training data, and I looked at the general principal but I am still a little confused.
My data set is like the following, where the first column is the response: [["up", "down", ....] , ["High","Medium" ,"Low",...], ..., ["a", "b", "c"]]
should I encode it like this:
xy=[[1,0,...], [0,,1,2,...],..., [0,1,2]]
could anyone help me with this , thank you so much!
|