forum.alglib.net
http://forum.alglib.net/

Format of decision forest using catagorical data
http://forum.alglib.net/viewtopic.php?f=2&t=2299
Page 1 of 1

Author:  wqxl309 [ Wed Apr 22, 2015 12:08 am ]
Post subject:  Format of decision forest using catagorical data

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!

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/