mvpa2.clfs.transerror.BayesConfusionHypothesis

Inheritance diagram of BayesConfusionHypothesis

class mvpa2.clfs.transerror.BayesConfusionHypothesis(alpha=None, labels_attr='predictions', space='hypothesis', **kwargs)

Bayesian hypothesis testing on confusion matrices.

For multi-class classification a single accuracy value is often not a meaningful performance measure – or at least hard to interpret. This class allows for convenient Bayesian hypothesis testing of confusion matrices. It computes the likelihood of discriminibility of any partitions of classes given a confusion matrix.

The returned dataset contains a single feature (the log likelihood of a hypothesis) and as many samples as possible partitions of classes. The actual partition configurations are stored in a sample attribute of nested lists. The top-level list contains discriminable groups of classes, whereas the second level lists contain groups of classes that cannot be discriminated under a given hypothesis. For example:

[[0, 1], [2], [3, 4, 5]]

This hypothesis represent the state where class 0 and 1 cannot be distinguish from each other, but both 0 and 1 together can be distinguished from class 2 and the group of 3, 4, and 5 – where classes from the later group cannot be distinguished from one another.

Notes

Available conditional attributes:

  • calling_time+: Time (in seconds) it took to call the node
  • raw_results: Computed results before invoking postproc. Stored only if postproc is not None.

(Conditional attributes enabled by default suffixed with +)

Parameters :

alpha : array

Bayesian hyper-prior alpha (in a multivariate-Dirichlet sense)

labels_attr : str

Name of the sample attribute in the input dataset that contains the class labels corresponding to the confusion matrix rows.

space : str

Name of the sample attribute in the output dataset where the hypothesis partition configurations will be stored.

enable_ca : None or list of str

Names of the conditional attributes which should be enabled in addition to the default ones

disable_ca : None or list of str

Names of the conditional attributes which should be disabled

postproc : Node instance, optional

Node to perform post-processing of results. This node is applied in __call__() to perform a final processing step on the to be result dataset. If None, nothing is done.

descr : str

Description of the instance

NeuroDebian

NITRC-listed