nano_predict | R Documentation |
Calculates predictions from model stored in a nano object.
nano_predict(nano, model_no, data_type = "train", fold = NULL)
nano |
a nano object. |
model_no |
a numeric. Position of model in |
data_type |
a character. Subset of dataset to calculate predictions off. |
fold |
a numeric. Fold number to calculate predictions off. |
data_type
can take the values: "train", "test", "holdout". However, these values
must first exist in the "data_id" column of the relevant dataset. To calculate the predictions
of a specific fold (if cross-validation was performed), used the fold
argument. If the
fold
argument is specified, then the data_type
argument will be ignored.
a data.table with two columns, actual and predicted.
## Not run:
if(interactive()){
library(h2o)
library(nano)
h2o.init()
# import dataset
data(property_prices)
# create model
nano <- nano_automl(data = data,
response = "sale_price")
# calculate training predictions
pred <- nano_predict(nano, 1, "train")
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.