Encapsulates and handles all the information and operations associated with a M.L. model.
new()
Method for initializing the object arguments during runtime.
Model$new(dir.path, model)
dir.path
The location were the executed models will be saved.
model
A Model
object.
isTrained()
The function is used to determine is the model has been already trained.
Model$isTrained()
getDir()
The function returns the location path of the specific model.
Model$getDir()
A character vector specifying the location of the model.
getName()
The function is used to obtain the name of the model.
Model$getName()
A character vector with the name of the model.
getFamily()
The function gets the family of the model.
Model$getFamily()
A character vector representing the family of the ML model.
getDescription()
The function allows obtaining the description associated with an specific ML model.
Model$getDescription()
A character vector with the model description.
train()
The function is responsible of performing model training operation.
Model$train(train.set, fitting, trFunction, metric, logs)
train.set
A data.frame with the data used for training the model.
fitting
The model fitting formula. Must inherit from
GenericModelFit
class.
trFunction
An object inherited from TrainFunction
used to define how the training acts.
metric
A character vector containing the metrics used to optimized model parameters.
logs
A character vector containing the path to store the error logs.
getTrainedModel()
The function allows obtaining the trained model.
Model$getTrainedModel()
A train
class.
getExecutionTime()
The function is used to compute the time taken to perform training operation.
Model$getExecutionTime()
A numeric vector with length 1.
getPerformance()
The function obtains the performance achieved by the model during training stage.
Model$getPerformance(metric = private$metric)
metric
A character used to specify the measure used to compute the performance.
A numeric value with the performance achieved.
getConfiguration()
The function is used to get the configuration parameters achieved by the ML model after the training stage.
Model$getConfiguration()
A list object with the configuration parameters.
save()
The function is responsible of saving the model to disc into a RDS file.
Model$save(replace = TRUE)
clone()
The objects of this class are cloneable with this method.
Model$clone(deep = FALSE)
deep
Whether to make a deep clone.
D2MCS
, TrainFunction