Description Usage Arguments Value Examples
Computes some quantities about the variables used in the splits of an
itree
object. This is new to itree.
1 | splitstats(tree,featlist=NULL)
|
tree |
an |
featlist |
A list of features to compute statistics of. Typically set to |
A data frame with each row being a feature and each column being a statistic about how that feature is used in the tree.
1 2 3 4 | require(mlbench); data(BostonHousing)
#fit a tree:
cart <- itree(medv~.,BostonHousing,minsplit=25,minbucket=25,cp=0)
splitstats(cart)
|
itree is based on the code of rpart.
Bug reports should be directed to this package's maintainer, not rparts'.
Loading required package: mlbench
var split.ct total.inv.depth total.node.size isroot isdepth1
1 crim 2 0.11654527 0.10512821 0 0
2 zn 0 0.00000000 0.00000000 0 0
3 indus 0 0.00000000 0.00000000 0 0
4 chas 0 0.00000000 0.00000000 0 0
5 nox 1 0.03121748 0.02222222 0 0
6 rm 3 0.36420395 0.35769231 1 1
7 age 1 0.03642040 0.03547009 0 0
8 dis 3 0.14203954 0.12820513 0 0
9 rad 0 0.00000000 0.00000000 0 0
10 tax 0 0.00000000 0.00000000 0 0
11 ptratio 0 0.00000000 0.00000000 0 0
12 b 0 0.00000000 0.00000000 0 0
13 lstat 5 0.30957336 0.35128205 0 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.