2 min read

pyevidence: practical evidence theory

Introduction

The pyevidence repository, installation and usage examples are available here.

I had properly discovered evidence theory – also known as Dempster-Shafer theory – recently, and wrote about it a bit here. Its a simple theory to get going with, and the Wikipedia article does a good job of introducing it. Briefly, the subject of evidence theory is the powerset of some set \(X\), to which credence (called “mass”) is assigned with the constraint that it adds up to \(1\) and that nothing is assigned to the emptyset. I.e. \(\sum_{A \in 2^X} m(A) = 1\), \(m(\emptyset) = 0\) and \(m: 2^X \to [0,1]\). Typically all unassigned mass is allocated to \(m(X)\): the vacuous set.

The central measures for evidence theory are \(bel(Q) = \sum_{A \subseteq Q} m(A)\), \(pl(Q) = \sum_{A \cup Q \ne \emptyset} m(A)\), which just state that the belief in \(Q \subseteq X\) is the sum of the mass assigned to all subsets which imply \(Q\), and that plausibility is the sum of the mass assigned to all subsets which do not contradict \(Q\). The most central operator is fusion (evidence combination), which allows us to combine many mass functions from independent sources before calculating something with it.

The main practical issues for evidence theory are computational. For example, a set \(X\) representing 10 components each in one of 10 modes, requires \(10^{10}\) models. An arbitrary subset of \(X\) would require listing all the combinations which apply. Operations such as intersection would involve searching two lists for common elements, and so on. Similarly, naive fusion requires roughly \(2^N\) intersections for \(N\) comparable mass assignments. It quickly gets unwieldy.

I wrote a little package for Python called pyevidence to ameliorate the computational issues and make evidence theory practical. Have a read through the repository for more details and usage examples.