Allows computing the classification performance values achieved
by D2MCS. The class is automatically created when D2MCS
classification method is invoked.
new()
Method for initializing the object arguments during runtime.
ClassificationOutput$new(voting.schemes, models)
voting.schemes
A list containing the voting schemes used
(inherited from VotingStrategy
.
models
A list containing the used Model
during classification stage.
getMetrics()
The function returns the measures used during training stage.
ClassificationOutput$getMetrics()
getPositiveClass()
The function gets the name of the positive class used for training/classification.
ClassificationOutput$getPositiveClass()
A character vector of size 1.
getModelInfo()
The function compiled all the information concerning to the M.L. models used during training/classification.
ClassificationOutput$getModelInfo(metrics = NULL)
metrics
A character vector defining the metrics used during training/classification.
A list with the information of each M.L. model.
getPerformances()
The function is used to compute the performance of D2MCS.
ClassificationOutput$getPerformances(
test.set,
measures,
voting.names = NULL,
metric.names = NULL,
cutoff.values = NULL
)
test.set
A Subset
object used to compute the
performance.
measures
A character vector with the measures to be used to
compute performance value (inherited from MeasureFunction
).
voting.names
A character vector with the name of the voting schemes to analyze the performance. If not defined, all the voting schemes used during classification stage will be taken into account.
metric.names
A character containing the measures used during training stage. If not defined, all training metrics used during classification will be taken into account.
cutoff.values
A character vector defining the minimum probability used to perform a a positive classification. If is not defined, all cutoffs used during classification stage will be taken into account.
dir.path
A character vector with location where the plot will be saved.
A list of performance values.
savePerformances()
The function is used to save the computed predictions into a CSV file.
ClassificationOutput$savePerformances(
dir.path,
test.set,
measures,
voting.names = NULL,
metric.names = NULL,
cutoff.values = NULL
)
dir.path
A character vector with location where the plot will be saved.
test.set
A Subset
object used to compute the
performance.
measures
A character vector with the measures to be used to
compute performance value (inherited from MeasureFunction
).
voting.names
A character vector with the name of the voting schemes to analyze the performance. If not defined, all the voting schemes used during classification stage will be taken into account.
metric.names
A character containing the measures used during training stage. If not defined, all training metrics used during classification will be taken into account.
cutoff.values
A character vector defining the minimum probability used to perform a a positive classification. If is not defined, all cutoffs used during classification stage will be taken into account.
plotPerformances()
The function allows to graphically visualize the computed performance.
ClassificationOutput$plotPerformances(
dir.path,
test.set,
measures,
voting.names = NULL,
metric.names = NULL,
cutoff.values = NULL
)
dir.path
A character vector with location where the plot will be saved.
test.set
A Subset
object used to compute the
performance.
measures
A character vector with the measures to be used to
compute performance value (inherited from MeasureFunction
).
voting.names
A character vector with the name of the voting schemes to analyze the performance. If not defined, all the voting schemes used during classification stage will be taken into account.
metric.names
A character containing the measures used during training stage. If not defined, all training metrics used during classification will be taken into account.
cutoff.values
A character vector defining the minimum probability used to perform a positive classification. If is not defined, all cutoffs used during classification stage will be taken into account.
getPredictions()
The function is used to obtain the computed predictions.
ClassificationOutput$getPredictions(
voting.names = NULL,
metric.names = NULL,
cutoff.values = NULL,
type = NULL,
target = NULL,
filter = FALSE
)
voting.names
A character vector with the name of the voting schemes to analyze the performance. If not defined, all the voting schemes used during classification stage will be taken into account.
metric.names
A character containing the measures used during training stage. If not defined, all training metrics used during classification will be taken into account.
cutoff.values
A character vector defining the minimum probability used to perform a a positive classification. If is not defined, all cutoffs used during classification stage will be taken into account.
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.
filter
A logical value used to specify if only predictions matching the target value should be returned or not. If TRUE the function returns only the predictions matching the target value. Conversely if FALSE (by default) the function returns all the predictions.
A PredictionOutput
object.
savePredictions()
The function saves the predictions into a CSV file.
ClassificationOutput$savePredictions(
dir.path,
voting.names = NULL,
metric.names = NULL,
cutoff.values = NULL,
type = NULL,
target = NULL,
filter = FALSE
)
dir.path
A character vector with location defining the location of the CSV file.
voting.names
A character vector with the name of the voting schemes to analyze the performance. If not defined, all the voting schemes used during classification stage will be taken into account.
metric.names
A character containing the measures used during training stage. If not defined, all training metrics used during classification will be taken into account.
cutoff.values
A character vector defining the minimum probability used to perform a positive classification. If is not defined, all cutoffs used during classification stage will be taken into account.
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.
filter
A logical value used to specify if only predictions matching the target value should be returned or not. If TRUE the function returns only the predictions matching the target value. Conversely if FALSE (by default) the function returns all the predictions.
clone()
The objects of this class are cloneable with this method.
ClassificationOutput$clone(deep = FALSE)
deep
Whether to make a deep clone.
D2MCS