AssignOriginTimeNaiveTriePostprocessor
- class AssignOriginTimeNaiveTriePostprocessor[source]
Functor to assign origin time property to trie nodes calculated as the average of the node’s rank and the minimum rank among its children.
Optionally calculates origin time expected value over this interval for a provided prior distribution.
- __init__(prior: ~hstrat.phylogenetic_inference.priors._detail._PriorBase.PriorBase = <hstrat.phylogenetic_inference.priors.ArbitraryPrior object>, assigned_property: str = 'origin_time') None [source]
Initialize functor instance.
Parameters
- priorPriorBase, default ArbitraryPrior()
Prior distribution of ancestor origin times.
Used to calculate interval means.
- assigned_propertystr, default “origin_time”
The property name for the assigned origin time.
Methods
- __init__(prior: ~hstrat.phylogenetic_inference.priors._detail._PriorBase.PriorBase = <hstrat.phylogenetic_inference.priors.ArbitraryPrior object>, assigned_property: str = 'origin_time') None [source]
Initialize functor instance.
Parameters
- priorPriorBase, default ArbitraryPrior()
Prior distribution of ancestor origin times.
Used to calculate interval means.
- 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 AssignOriginTimeNaiveTriePostprocessor.<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.
Not used in the current implementation.
- 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.