Prev: listbox
Next: XML Parsing
From: Jan Klima on 30 Mar 2010 15:55 Hi, is there a simple way to get a list of tree nodes in the order in which the nodes were split during the top down recursive partitioning? It seems to me that nodes are normally indexed by layers - top-down, left-to-right. I'm using classregtree implementation in Matlab 2009a. Thanks for any advice!
From: Ilya Narsky on 30 Mar 2010 17:22 Jan Klima wrote: > Hi, > is there a simple way to get a list of tree nodes in the order in which > the nodes were split during the top down recursive partitioning? It > seems to me that nodes are normally indexed by layers - top-down, > left-to-right. I'm using classregtree implementation in Matlab 2009a. > > Thanks for any advice! Jan, it depends on what you mean by "the order in which the nodes were split" and how you want to use this info. A tree can be reduced to a flat list of its nodes in a number of ways. You can use ISBRANCH to find leaf and branch nodes. The branch nodes are split in the same order as they are numbered, that is, a branch node with a lower index is always split before a branch node with a larger index. The nodes are numbered top to bottom and left to right. Perhaps the easiest way to understand the numbering is to VIEW a tree and click on nodes to see their numbers. -Ilya
|
Pages: 1 Prev: listbox Next: XML Parsing |