Hi, I have used the function rtree =RegressionTree.fit(X,Y), afterwards I have used the function resubLoss(rtree). I got a really resubLoss (or MSE). I have read that sometimes it is better to use th RMSE in order to have the result in the same dimension as the data. Might this be the problem? How would I change resubLoss in order to calculate the root of it?
Thank you :)

 Réponse acceptée

Shashank Prasanna
Shashank Prasanna le 9 Juil 2014

0 votes

Maybe a single regression tree is not sufficient to model your data. You may want to try using an ensemble of bagged trees.
To answer your original question, you can simply take the square root of the output
sqrt(resubLoss(tree))
Alternatively, you can specify your own loss function:

3 commentaires

Tania
Tania le 9 Juil 2014
Thank you! By the way do you know how I can calculate the MAE for my regression tree? Also, according to this http://www.mathworks.de/de/help/stats/linearmodel-class.html does it mean that I would calculate my MSE for a linear regression model, e.g. like this: SSE = mdl.SSE and DFE=mdl.DFE so that myMSE=SSE/DFE ? Final question, I would like to check the criteria for several different dataset and I don’t want to enter all this individual each time in the command line. Is there an option in matlab where I can let different models run through these criteria? Thanks a lot for your help, I really appreciate it. Tania
Shashank Prasanna
Shashank Prasanna le 9 Juil 2014
Tania, you have several good questions. Have you tried contacting technical support? You will be able to get all of these addressed on the phone or by a quick email:
Tania
Tania le 10 Juil 2014
Thanks, I have done it now (but did it before and it took really long to get an answer). If you have any idea for any of the above questions i would really appreciate it. Thank you!:))

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by