pusion.core.maximum_likelihood_combiner¶
- class pusion.core.maximum_likelihood_combiner.MaximumLikelihoodCombiner¶
Bases:
pusion.core.combiner.TrainableCombiner
The
MaximumLikelihoodCombiner
(MLE) is a combiner that estimates the parameters \(\mu\) (sample means) and \(\sigma\) (sample variances) of the Gaussian probability density function for each class \(\omega\). Multiple decision outputs for a sample are converted into a new feature space.The fusion is performed by evaluating the class conditional density
\[p(x|\omega) = \frac{1}{\sigma \sqrt{2 \pi}} exp\left({-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2}\right).\]of a transformed sample \(x\) for each available class \(\omega\), respectively. The class with the highest likelihood is considered as winner and thus forms the decision fusion.
- train(decision_tensor, true_assignments)¶
Train the Maximum Likelihood combiner model by calculating the parameters of gaussian normal distribution (i.e. means and variances) from the given decision outputs and true class assignments. Both continuous and crisp classification outputs are supported. This procedure transforms decision outputs into a new feature space.
- Parameters
decision_tensor – numpy.array of shape (n_classifiers, n_samples, n_classes). Tensor of either crisp or continuous decision outputs by different classifiers per sample.
true_assignments – numpy.array of shape (n_samples, n_classes). Matrix of either crisp or continuous class assignments which are considered true for each sample during the training procedure.
- combine(decision_tensor)¶
Combine decision outputs by the Maximum Likelihood method. This procedure involves evaluating the class conditional density as described above. Both continuous and crisp classification outputs are supported. Combining requires a trained
MaximumLikelihoodCombiner
.- Parameters
decision_tensor – numpy.array of shape (n_classifiers, n_samples, n_classes). Tensor of either crisp or continuous decision outputs by different classifiers per sample.
- Returns
A matrix (numpy.array) of either crisp or continuous class assignments which represents fused decisions obtained by MLE. Axis 0 represents samples and axis 1 the class assignments which are aligned with axis 2 in
decision_tensor
input tensor.
- class pusion.core.maximum_likelihood_combiner.CRMaximumLikelihoodCombiner¶
Bases:
pusion.core.maximum_likelihood_combiner.MaximumLikelihoodCombiner
The
CRMaximumLikelihoodCombiner
is a modification ofMaximumLikelihoodCombiner
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 use methodstrain()
andcombine()
a coverage needs to be set first by the inheritedset_coverage()
method.- train(decision_outputs, true_assignments)¶
Train the Maximum Likelihood combiner model by calculating the parameters of gaussian normal distribution (i.e. means and variances) from the given decision outputs and true class assignments. Both continuous and crisp classification outputs are supported. This procedure transforms decision outputs into a new feature space.
- Parameters
decision_outputs – list 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 either crisp or continuous decision outputs per sample.
true_assignments – numpy.array of shape (n_samples, n_classes). Matrix of either crisp or continuous class assignments which are considered true for each sample during the training procedure.
- combine(decision_outputs)¶
Combine decision outputs by the Maximum Likelihood method. This procedure involves evaluating the class conditional density as described above. Both continuous and crisp classification outputs are supported. Combining requires a trained
MaximumLikelihoodCombiner
.- Parameters
decision_outputs – list 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 or continuous decision outputs per sample.
- Returns
A matrix (numpy.array) of either crisp or continuous class assignments which represents fused decisions obtained by MLE. Axis 0 represents samples and axis 1 the class assignments which are aligned with axis 2 in
decision_tensor
input tensor.