Classification regression tree structure

Has anyone used
clasregtree
function to build a tree with numerical responses (Y)? If yes then any idea how the means (Y bar) at each leaf (terminal nodes) is calculated?
Thanks

Antworten (1)

the cyclist
the cyclist am 13 Aug. 2014

0 Stimmen

Have you tried reading the documentation?
doc classregtree
or looking at the code?
edit classregtree

4 Kommentare

Sincloe Brans
Sincloe Brans am 13 Aug. 2014
Yes kind of did, I am not good in reading the code, hence asking for experts advise. I looked for keyword 'avg' or 'mean' which didn't show up! Eventually I need to find the observations over which each ybar is calculated at the leaf.
the cyclist
the cyclist am 13 Aug. 2014
I don't know the function well. Are the means a standard output of the function? If so, then you should be able to trace the name of the output variable backward through the function, to see how it is calculated.
Sincloe Brans
Sincloe Brans am 19 Aug. 2014
Attached is the function, actually classregtree is a class which I have no idea how to edit or get the intermediate results. If you look at line 746, ybar is calculated. Any idea on how to obtain that?
the cyclist
the cyclist am 20 Aug. 2014
Bearbeitet: the cyclist am 20 Aug. 2014
I suggest you take a look at this page about debugging MATLAB.
Where you first call classregtree, you should be able to set a breakpoint, and then step through the function line-by-line to see the values all variables during the calculation.

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 13 Aug. 2014

Bearbeitet:

am 20 Aug. 2014

Community Treasure Hunt

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

Start Hunting!

Translated by