Model | R Documentation |
This class implements a model. A Model object can only exist as element of a TrainLayer or a TrainMetaLayer object. A Model object is automatically created by fitting a learner on a training data.
A Model object can compute predictions for a TestData object. See the predict
function below.
new()
Constructor of Model class.
Model$new(lrner, train_data, base_model, train_layer)
lrner
Lrner
The learner.
train_data
TrainData(1)
Training data.
base_model
object
Base model as returned by the original learn function.
train_layer
TrainLayer
The current training layer on which the model is stored.
An object is returned.
print()
Printer
Model$print(...)
...
any
summary()
Summary
Model$summary(...)
...
any
getBaseModel()
Getter of the base model
Model$getBaseModel()
getTrainData()
Getter of the traning data
Model$getTrainData()
getTrainLabel()
Getter of the individual ID column in the training data.
Model$getTrainLabel()
...
any
getLrner()
Getter of the learner use to fit the model.
Model$getLrner()
setId()
Setter of the model ID.
Model$setId(id)
id
character
ID value
predict()
Predict target values for the new data (from class TestData) taken as into.
Model$predict(testing_data, use_var_sel, ind_subset = NULL)
testing_data
TestData
An object from class TestData.
use_var_sel
boolean
If TRUE, selected variables available at each layer are used.
ind_subset
vector
Subset of individual IDs to be predicted.
...
Further parameters to be passed to the basic predict function.
The predicted object are returned. The predicted object must be either a vector or a list containing a field predictions with predictions.
clone()
The objects of this class are cloneable with this method.
Model$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.