Description Usage Arguments Examples
Plots a single tree in the forest.
1 2 3 4 5 6 7 8 9 |
x |
A trained model object of class "forestry". |
tree.id |
Specifies the tree number that should be visualized |
print.meta_dta |
Should the data for the plot be printed? |
beta.char.len |
The length of the beta values in leaf node representation. |
return.plot.dta |
If TRUE no plot will be generated, but instead a list with all the plot data is returned. |
... |
additional arguments that are not used. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | set.seed(292315)
rf <- forestry(x = iris[,-1],
y = iris[, 1])
plot(x = rf)
plot(x = rf, tree.id = 2)
plot(x = rf, tree.id = 500)
ridge_rf <- forestry(
x = iris[,-1],
y = iris[, 1],
replace = FALSE,
nodesizeStrictSpl = 10,
mtry = 4,
ntree = 1000,
minSplitGain = .004,
linear = TRUE,
overfitPenalty = 1.65,
linFeats = 1:2)
plot(x = ridge_rf)
plot(x = ridge_rf, tree.id = 2)
plot(x = ridge_rf, tree.id = 1000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.