pusion.core.borda_count_combiner

class pusion.core.borda_count_combiner.BordaCountCombiner

Bases: pusion.core.combiner.UtilityBasedCombiner

The BordaCountCombiner (BC) is a decision fusion method that establishes a ranking between label assignments for a sample. This ranking is implicitly given by continuous support outputs and is mapped to different amounts of votes (\(0\) of \(L\) votes for the lowest support, and \(L-1\) votes for the highest one). A class with the highest sum of these votes (borda counts) across all classifiers is considered as a winner for the final decision.

combine(decision_tensor)

Combine decision outputs by the Borda Count (BC) method. Firstly, the continuous classification is mapped to a ranking with respect to available classes for each sample. Those rankings are then summed up across all classifiers to establish total votes (borda counts) for each class in a sample. The class with the highest number of borda counts is considered as decision fusion. Only continuous classification outputs are supported.

Parameters

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

Returns

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

class pusion.core.borda_count_combiner.CRBordaCountCombiner

Bases: pusion.core.borda_count_combiner.BordaCountCombiner

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

combine(decision_outputs)

Combine complementary-redundant decision outputs by the Borda Count (BC) method. Firstly, the continuous classification is mapped to a ranking with respect to available classes for each sample. Those rankings are then summed up across all classifiers to establish total votes (borda counts) for each class in a sample. The class with the highest number of borda counts is considered as decision fusion. Only continuous 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 continuous decision outputs per sample.

Returns

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