Description Usage Arguments Value Note Examples
Easily find the distribtution of the response variable at each of the nodes of a classification tree.
1 | distAtNodes(mod, df, resp_varname)
|
mod |
A tree model constructed by the |
df |
A data frame (usually the training set, quiz set or test set). |
resp_varname |
The name of the response variable, as a character string. |
A table object.
For more details on use, consult http://statistics.rainandrhino.org/tigerTree/distAtNodes.html
1 2 3 4 5 6 7 8 | ## Not run:
dfs <- divideTrainTest(seed = 3030, prop.train = 0.67, data = iris)
irisTrain <- dfs$train
irisTest <- dfs$test
tr.mod <- tree(Species ~ ., data = irisTrain)
distAtNodes(tr.mod, df = irisTest, resp_varname = "Species")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.