Learn R Programming

D2MCS (version 1.0.1)

PredictionOutput: Encapsulates the achieved predictions.

Description

The class used to encapsulates all the computed predictions to facilitate their access and maintenance.

Arguments

Methods


Method new()

Method for initializing the object arguments during runtime.

Usage

PredictionOutput$new(predictions, type, target)

Arguments

predictions

A list of FinalPred elements.

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.


Method getPredictions()

The function returns the final predictions.

Usage

PredictionOutput$getPredictions()

Returns

A list containing the final predictions or NULL if classification stage was not successfully performed.


Method getType()

The function returns the type of prediction should be returned. If "prob" or "raw" is defined then computed 'probabilistic' or 'class' values are returned.

Usage

PredictionOutput$getType()

Returns

A character value.


Method getTarget()

The function returns the value of the target class.

Usage

PredictionOutput$getTarget()

Returns

A character value.


Method clone()

The objects of this class are cloneable with this method.

Usage

PredictionOutput$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

See Also

D2MCS