YuchenZhang217 / randomforest-matlab

Automatically exported from code.google.com/p/randomforest-matlab
0 stars 0 forks source link

Dimension of output variable ndbigtree incorrect #16

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

first of all thank you for enabling to use RF in Matlab.

This is nothing big, but initially I was a little bit confused by the size of 
the returned model.ndbigtree, which is [nrnodes x ntrees].

I found a description of Andy Liaw stating that the size should be a vector of 
size ntree, containing the number of nodes for each tree.
https://stat.ethz.ch/pipermail/r-help/2003-April/032256.html

I suppose changing the mex_ClassificationRF_train.cpp line 114 might solve that 
problem:
plhs[9] = mxCreateNumericMatrix(1, nt, mxINT32_CLASS, mxREAL);

You also might want to consider adding the above mentioned descriptions of the 
ouput variables into your .m file. I had a hard time finding out which content 
these variables are holding.

Regards,
Johannes

Original issue reported on code.google.com by johannes...@gmail.com on 24 May 2011 at 2:39

GoogleCodeExporter commented 8 years ago
Hi Johannes

thanks for the bug report.

when i ported it, i had a vague idea of all the book-keeping variables and 
output variables. I thought ndbigtree was one of those book-keeping variables 
and not an output variable. I think i mentioned a comment for all other 
variables that i thought were output variables but i might have missed that.

nowadays i have a better idea of which variables are book-keeping only and 
which are output variables and will update the source. i'll keep this issue 
open till i get them fixed.

thanks a lot!

Original comment by abhirana on 25 May 2011 at 6:11