Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get individual tree predictions for regression #65

Open
GoogleCodeExporter opened this issue Mar 7, 2016 · 2 comments
Open

How to get individual tree predictions for regression #65

GoogleCodeExporter opened this issue Mar 7, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

Is it possible to get the prediction per tree using regression, just as it is 
with classification?

This is possible:
[Y_hat, votes, prediction_pre_tree] = classRF_predict(X_tst,model,test_options);

But how can I make this work too?
[Y_hat, prediction_pre_tree] = regRF_predict(X_tst,model,test_options);

This would allow me to estimate the variance.

I know that it is possible in the c++ code, just not in the Matlab interface. I 
am not very skilled with c++ and compiling the mex codes; maybe someone has a 
compiled Mexfile with this feature?

Many thanks!

Original issue reported on code.google.com by woutervo...@gmail.com on 9 Sep 2014 at 8:14

@GoogleCodeExporter
Copy link
Author

yup.

https://code.google.com/p/randomforest-matlab/source/browse/trunk/RF_Reg_C/regRF
_predict.m#12

see this example
https://code.google.com/p/randomforest-matlab/source/browse/trunk/RF_Reg_C/tutor
ial_RegRF.m#240

Original comment by abhirana on 10 Sep 2014 at 1:31

@GoogleCodeExporter
Copy link
Author

Thanks, now it works! I was using the version from downloads rather than SVN...

Original comment by woutervo...@gmail.com on 10 Sep 2014 at 7:47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant