brew.combination package¶
Submodules¶
brew.combination.combiner module¶
brew.combination.rules module¶
 [1] Kittler, J.; Hatef, M.; Duin, R.P.W.; Matas, J., “On combining
 classifiers,” Pattern Analysis and Machine Intelligence, IEEE Transactions on , vol.20, no.3, pp.226,239, Mar 1998

brew.combination.rules.
majority_vote_rule
(votes)[source]¶ Implements the majority vote rule as defined by [1].
This rule can always be used, because even if the classifiers output posterior probabilities, you can for example, decide to vote for the class with the greatest probability. The important thing is to transform the classifiers probabilitities/decisions into a matrix of votes.
Parameters: votes (Numpy 2darray with rows representing each class, columns) – representing each classifier and elements representing votes (binary). Each column should sum up to one (i.e. a classifier can only vote for one class).

brew.combination.rules.
max_rule
(probs)[source]¶ Implements the max rule as defined by [1].
This rule only makes sense if the classifiers output the posterior probabilities for each class.
Parameters: probs (Numpy 2darray with rows representing each class, columns) – representing each classifier and elements representing posterior probabilities. Each column should sum up to one as a sanity check that the probabilities are valid.

brew.combination.rules.
mean_rule
(probs)[source]¶ Implements the first case of the median rule as defined by [1].
This rule only makes sense if the classifiers output the posterior probabilities for each class.
Parameters: probs (Numpy 2darray with rows representing each class, columns) – representing each classifier and elements representing posterior probabilities. Each column should sum up to one as a sanity check that the probabilities are valid.

brew.combination.rules.
median_rule
(probs)[source]¶ Implements the second case of the median rule as defined by [1].
This rule only makes sense if the classifiers output the posterior probabilities for each class.
Parameters: probs (Numpy 2darray with rows representing each class, columns) – representing each classifier and elements representing posterior probabilities. Each column should sum up to one as a sanity check that the probabilities are valid.

brew.combination.rules.
min_rule
(probs)[source]¶ Implements the min rule as defined by [1].
This rule only makes sense if the classifiers output the posterior probabilities for each class.
Parameters: probs (Numpy 2darray with rows representing each class, columns) – representing each classifier and elements representing posterior probabilities. Each column should sum up to one as a sanity check that the probabilities are valid.