Allows to obtain predictions from the data provided using a pre-trained model.
new()
Method for initializing the object arguments during runtime.
Prediction$new(model, feature.id = NULL)
model
A list containing the information of the trained model composed of five elements: "model.name", "exec.time", "model.performance", "model.data" and "model.libs".
feature.id
A character value containing the column name used as identifier.
execute()
Calculates predictions of the values passed by parameters using the corresponding model.
Prediction$execute(pred.values, class.values, positive.class)
pred.values
A data.frame containing the values to predict.
class.values
A vector containing the class values.
positive.class
A character value containing the positive class.
getPrediction()
The function is used to return the prediction values computed.
Prediction$getPrediction(type = NULL, target = NULL)
type
A character to define which type of predictions should be returned. If not defined all type of probabilities will be returned. Conversely if "prob" or "raw" is defined then computed 'probabilistic' or 'class' values are returned.
target
A character defining the value of the positive class.
A data.frame with the computed prediction.
getModelName()
Gets the model name.
Prediction$getModelName()
The character value of model value.
getModelPerformance()
Gets the performance of the model.
Prediction$getModelPerformance()
The numeric value of the model's performance.
clone()
The objects of this class are cloneable with this method.
Prediction$clone(deep = FALSE)
deep
Whether to make a deep clone.
ClusterPredictions