Description Usage Arguments Value Examples
Create a test, which can be run using any of the available runtest functions
1 2 3 |
data |
A data frame |
problem |
Either classification or regression. This influences how the algorithms are trained and what method is used to determine performance |
dependent |
The dependent variable: the name of the column containing the prediction goal |
data_transform |
A quoted function name that transforms the data. It should maintain it in data frame form and maintain the dependent variable. |
train_index |
A vector of the rows to be used as training set. All other rows will form the holdout set |
method |
The regression or classification method |
name |
The name of the test. Printed in the test results |
description |
Optional. A more elaborate description of the test |
... |
Extra arguments used while running the test. |
An object of class 'classification' or 'regression', which holds the data, method, etc. for executing the test case.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data(iris)
# A classification test
test <- createtest(data = iris,
dependent = "Species",
problem = "classification",
method = "randomForest",
name = "An example classification test",
train_index = sample(150, 100)
)
# A regression test
test <- createtest(data = iris,
dependent = "Sepal.Width",
problem = "regression",
method = "randomForest",
name = "An example regression test",
train_index = sample(150, 100)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.