How does RegressionTree.fit works?

Hi,
I made a regression tree. now I will describe the process. But I cannot find the procedure as described in the literature. I know that the split is formed with MSE, but the calculation is never done.
The documentation center (<http://www.mathworks.de/de/help/stats/classification-trees-and-regression-trees.html>) describe the process a little bit, but there are no code.
Can you help me and give a hint where i can find this?
thanks

 采纳的回答

Ilya
Ilya 2013-2-4
The MATLAB implementation is based on this book:
Breiman, L., J. Friedman, R. Olshen, and C. Stone. Classification and Regression Trees. Boca Raton, FL: CRC Press, 1984.

3 个评论

The book I have here, but what I miss is concrete extracts of code. I think I understand the procedure, but I can not reconstruct the code. A concrete example is the calculation of the error by MSE. There is a file mse.m but this is never called. Even with setting a breakpoint, the file is not called.
You won't be able to see the actual code. The split search in RegressionTree is coded in C++ for speed, and the code is not shipped.
You can compute MSE using the var function from the Statistics Toolbox. For example, let y be a vector of response values for all observations landing on a specific node of the decision tree. The value predicted by the tree for this node is then mean(y). The MSE associated with this node is var(y,1). The weighted MSE used to compute the split gain is numel(y)*var(y,1).
Thanks this is a great answer. I was really confused that I cannot see the code, but now its clear. That is an argumentation that I can use in my attachment, thank you very much.

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Analysis of Variance and Covariance 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by