This module provides a class for representing and working with posterior distribution.
Class for representing posterior distribution.
Except for trivial cases, we can only have an estimated posterior distribution. It is usually constructed as a list of the top N networks found during a search of the space of networks.
The pebl posterior object supports a list-like interface. So, given a posterior object post, one can do the following:
- Access the top-scoring network: post[0]
- Access the top 10 networks as a new posterior object: post[0:10]
- Calculate entropy of distribution: post.entropy
- Iterate through networks: for net in post: print net.score
Note: a posterior object is immutable. That is, you cannot add and remove networks once it is created. See result.Result for a mutable container for networks.
Creates a posterior object.
adjacency_matrices and scores can be lists or numpy arrays. If sorted is True, adjacency_matrices and scores should be sorted in descending order of score.
Return a consensus network with the given threshold.
The information entropy of the posterior distribution.