Description Usage Arguments Value Examples
This function will execute a classification tree built with this package on new data.
1 | run_model(model, new.data)
|
model |
A model object trained with the |
new.data |
Dataset to be classified using the defined model. |
predict Returns new.data dataset with classes appended as column "predict"
1 2 3 4 5 6 7 8 | train.index <- split_data(iris.data, 0.7)
training.data <- iris.data[train.index, ]
test.data <- iris.data[-train.index, ]
obj.func <- formula(Species ~ Sepal.Length + Sepal.Width)
my.model <- train_tree(obj.func, training.data)
predictions <- run_model(my.model, test.data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.