pusion.core.micro_majority_vote_combiner

class pusion.core.micro_majority_vote_combiner.MicroMajorityVoteCombiner

Bases: pusion.core.combiner.UtilityBasedCombiner

The MicroMajorityVoteCombiner (MIMV) is based on a variation of the general majority vote method. The fusion consists of a decision vector which results from the majority of assignments for each individual class.

combine(decision_tensor)

Combine decision outputs by MIMV across all classifiers per class (micro). Only crisp classification outputs are supported.

Parameters

decision_tensornumpy.array of shape (n_classifiers, n_samples, n_classes). Tensor of crisp decision outputs by different classifiers per sample.

Returns

A matrix (numpy.array) of crisp class assignments obtained by MIMV. Axis 0 represents samples and axis 1 the class labels which are aligned with axis 2 in decision_tensor input tensor.

class pusion.core.micro_majority_vote_combiner.CRMicroMajorityVoteCombiner

Bases: pusion.core.micro_majority_vote_combiner.MicroMajorityVoteCombiner

The CRMicroMajorityVoteCombiner is a modification of MicroMajorityVoteCombiner that also supports complementary-redundant decision outputs. Therefore the input is transformed, such that all missing classification assignments are considered as a constant, respectively. To call combine() a coverage needs to be set first by the inherited set_coverage() method.

combine(decision_outputs)

Combine decision outputs by MIMV across all classifiers per class (micro). Only crisp classification outputs are supported.

Parameters

decision_outputslist of numpy.array matrices, each of shape (n_samples, n_classes’), where n_classes’ is classifier-specific and described by the coverage. Each matrix corresponds to one of n_classifiers classifiers and contains crisp decision outputs per sample.

Returns

A matrix (numpy.array) of crisp class assignments which are obtained by MIMV. Axis 0 represents samples and axis 1 all the class labels which are provided by the coverage.