Learn R Programming

D2MCS (version 1.0.1)

ClassWeightedVoting: Implementation Weighted Voting scheme.

Description

A new implementation of ClassMajorityVoting where each class value has different values (weights).

Arguments

Super class

D2MCS::SimpleVoting -> ClassWeightedVoting

Methods

Inherited methods


Method new()

Method for initializing the object arguments during runtime.

Usage

ClassWeightedVoting$new(cutoff = 0.5, weights = NULL)

Arguments

cutoff

A character vector defining the minimum probability used to perform a positive classification. If is not defined, 0.5 will be used as default value.

weights

A numeric vector with the weights of each cluster. If NULL performance achieved during training will be used as default.


Method getWeights()

The function returns the weights used to perform the voting scheme.

Usage

ClassWeightedVoting$getWeights()

Returns

A numeric vector.


Method setWeights()

The function allows changing the value of the weights.

Usage

ClassWeightedVoting$setWeights(weights)

Arguments

weights

A numeric vector containing the new weights.


Method execute()

The function implements the cluster-weighted majority voting procedure.

Usage

ClassWeightedVoting$execute(predictions, verbose = FALSE)

Arguments

predictions

A ClusterPredictions object containing all the predictions achieved for each cluster.

verbose

A logical value to specify if more verbosity is needed.


Method clone()

The objects of this class are cloneable with this method.

Usage

ClassWeightedVoting$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

See Also

D2MCS, ClassMajorityVoting, ClassWeightedVoting, ProbAverageVoting, ProbAverageWeightedVoting, ProbBasedMethodology