MinDepth | R Documentation |
Calculates the average minimal depth of each predictor used to fit a CERFIT object. It calculates Variables importance by using a Variables average minimal depth. variable's with a lower average minimal depth are more important.
MinDepth(cerfit)
cerfit |
A fitted CERFIT object |
The depth of the root node is zero and if a variable does not appear at any split in a tree it is assigned maxdepth + 1 for that tree.
Returns a named vector with the name of each predictor used to fit the CERFIT object and its corresponding average minimal depth across all trees
fit <- CERFIT(Result_of_Treatment ~ sex + age + Number_of_Warts + Area + Time + Type | treatment, data = warts, ntrees = 30, method = "RCT", mtry = 2) importance <- MinDepth(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.