Prediction: Manages the prediction computed for a specific model.

PredictionR Documentation

Manages the prediction computed for a specific model.

Description

Allows to obtain predictions from the data provided using a pre-trained model.

Methods

Public methods


Method new()

Method for initializing the object arguments during runtime.

Usage
Prediction$new(model, feature.id = NULL)
Arguments
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.


Method execute()

Calculates predictions of the values passed by parameters using the corresponding model.

Usage
Prediction$execute(pred.values, class.values, positive.class)
Arguments
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.


Method getPrediction()

The function is used to return the prediction values computed.

Usage
Prediction$getPrediction(type = NULL, target = NULL)
Arguments
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.

Returns

A data.frame with the computed prediction.


Method getModelName()

Gets the model name.

Usage
Prediction$getModelName()
Returns

The character value of model value.


Method getModelPerformance()

Gets the performance of the model.

Usage
Prediction$getModelPerformance()
Returns

The numeric value of the model's performance.


Method clone()

The objects of this class are cloneable with this method.

Usage
Prediction$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

ClusterPredictions


D2MCS documentation built on Aug. 23, 2022, 5:07 p.m.