| CombinedVoting {D2MCS} | R Documentation |
Implementation of Combined Voting.
Description
Calculates the final prediction by performing the result of the
predictions of different metrics obtained through a SimpleVoting
class.
Super class
D2MCS::VotingStrategy -> CombinedVoting
Methods
Public methods
Inherited methods
Method new()
Method for initializing the object arguments during runtime.
Usage
CombinedVoting$new(voting.schemes, combined.metrics, methodology, metrics)
Arguments
voting.schemesA list of elements inherited from
SimpleVoting.combined.metricsAn object defining the metrics used to combine the voting schemes. The object must inherit from
CombinedMetricsclass.methodologyAn object specifying the methodology used to execute the combined voting. Object inherited from
MethodologyobjectmetricsA character vector with the name of the metrics used to perform the combined voting operations. Metrics should be previously defined during training stage.
Method getCombinedMetrics()
The function returns the metrics used to combine the metrics results.
Usage
CombinedVoting$getCombinedMetrics()
Returns
An object inherited from CombinedMetrics class.
Method getMethodology()
The function gets the methodology used to execute the combined votings.
Usage
CombinedVoting$getMethodology()
Returns
An object inherited from Methodology class.
Method getFinalPred()
The function returns the predictions obtained after executing the combined-voting methodology.
Usage
CombinedVoting$getFinalPred(type = NULL, target = NULL, filter = NULL)
Arguments
typeA 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.
targetA character defining the value of the positive class.
filterA 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.
Returns
A data.frame with the computed predictions.
Method execute()
The function implements the combined voting scheme.
Usage
CombinedVoting$execute(predictions, verbose = FALSE)
Arguments
predictionsA
ClusterPredictionsobject containing the predictions computed for each cluster.verboseA logical value to specify if more verbosity is needed.
Method clone()
The objects of this class are cloneable with this method.
Usage
CombinedVoting$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
D2MCS, ClassMajorityVoting,
ClassWeightedVoting, ProbAverageVoting,
ProbAverageWeightedVoting, ProbBasedMethodology,
SimpleVoting