Learn R Programming

D2MCS (version 1.0.1)

ProbAverageWeightedVoting: Implementation of Probabilistic Average Weighted voting.

Description

Computes the final prediction by performing the weighted mean of the probability achieved by each cluster prediction. By default, weight values are consistent with the performance value achieved by the best M.L. model on each cluster.

Arguments

Super class

D2MCS::SimpleVoting -> ProbAverageWeightedVoting

Methods

Inherited methods


Method new()

Method for initializing the object arguments during runtime.

Usage

ProbAverageWeightedVoting$new(cutoff = 0.5, class.tie = NULL, 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.

class.tie

A character used to define the target class value used when a tie is found. If NULL positive class value will be assigned.

weights

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


Method getClassTie()

The function gets the class value assigned to solve ties.

Usage

ProbAverageWeightedVoting$getClassTie()

Returns

A character vector of length 1.


Method getWeights()

The function returns the value of the majority class.

Usage

ProbAverageWeightedVoting$getWeights()

Returns

A character vector of length 1 with the name of the majority class.


Method setWeights()

The function allows changing the value of the weights.

Usage

ProbAverageWeightedVoting$setWeights(weights)

Arguments

weights

A numeric vector containing the new weights.


Method execute()

The function implements the cluster-weighted probabilistic voting procedure.

Usage

ProbAverageWeightedVoting$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

ProbAverageWeightedVoting$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

See Also

D2MCS, ClassMajorityVoting, ClassWeightedVoting, ProbAverageVoting, ProbAverageWeightedVoting, ProbBasedMethodology