AssignOriginTimeExpectedValueTriePostprocessor
- class AssignOriginTimeExpectedValueTriePostprocessor[source]
Functor to assign origin time property to trie nodes using expected values over the distribution of possible differentia collisions.
Computes the origin time of trie nodes based on the expected value, taking into account the probability of differentia collision and the prior distribution expected for ancestor origin times.
- __init__(prior: PriorBase, assigned_property: str = 'origin_time') None [source]
Initialize functor instance.
Parameters
- priorPriorBase
The prior distribution used to calculate expected values.
- assigned_propertystr, default “origin_time”
The property name for the assigned origin time.
Methods
- __init__(prior: PriorBase, assigned_property: str = 'origin_time') None [source]
Initialize functor instance.
Parameters
- priorPriorBase
The prior distribution used to calculate expected values.
- assigned_propertystr, default “origin_time”
The property name for the assigned origin time.
- __call__(trie: ~hstrat.phylogenetic_inference.tree._impl._TrieInnerNode.TrieInnerNode, p_differentia_collision: float, mutate: bool = False, progress_wrap: ~typing.Callable = <function AssignOriginTimeExpectedValueTriePostprocessor.<lambda>>) TrieInnerNode [source]
Assign origin times to trie nodes.
Parameters
- trieTrieInnerNode
The input trie to be postprocessed.
- p_differentia_collisionfloat
Probability of a randomly-generated differentia matching an existing differentia.
- mutatebool, default False
Are side effects on the input argument trie allowed?
- progress_wraptyping.Callable, optional
Pass tqdm or equivalent to report progress.
Returns
- TrieInnerNode
The postprocessed trie with assigned origin times.