Hello!
I get problem with using random forest methods
Here is building RF
Code:
double[,] xy = new double[,]
{{0, 0, 0, 0, 0, 255, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 1},
{0, 255, 0, 0, 0, 0, 0, 0, 2},
{0, 0, 0, 0, 255, 0, 0, 0, 3},
{0, 0, 0, 0, 0, 0, 0, 255, 4}};
alglib.dfbuildrandomdecisionforestx1(xy, 8, 5, 5, 50, 3, 0.6, out info, out df, out rep);
When I try to use it like this
Code:
double[] x = new double[]{0, 0, 0, 0, 0, 0, 0, 0};
alglib.dfprocess(df, x, ref y);
I get wrong classification result {0.005, 0.49, 0, 0.505, 0}. So max possibility is 4th value (0.505). But it should be 2nd value (inner value is zero array, that is class 1)
Please help me to solve this problem.
Thank you!