predict_new | R Documentation |
This function is used when the user created the models and evaluated them on a dataset x and later on, he got new observations and wants to predict the target value for them. The 'predict_new()' function quickly normalizes their format, like a subset of columns that were deleted for the models and makes predictions. It is strongly advised that the new dataset shouldn't have any missing values.
predict_new(train_out, data, verbose = TRUE)
train_out |
The output of the 'train()' function. |
data |
A dataset with the same format as the one used in 'train()' function, but with new observations. |
verbose |
A logical value, if set to TRUE, provides all information about the process, if FALSE gives none. |
A list of predictions.
## Not run:
data(lisbon)
lisbon_train <- lisbon[1:200, ]
lisbon_new <- lisbon[201:246, ]
out <- train(lisbon_train, 'Price', verbose = FALSE, bayes_iter = 0, random_evals = 1)
preds <- predict_new(out, lisbon_new)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.