estimators
Tools to estimate MRCA generation from shared ranks of commonality and disparity.
Functions
Estimate the most recent common ancestor (MRCA) at the rank with the highest posterior probability. |
|
Compute a simple, fast estimate the rank of the most recent common ancestor (MRCA). |
|
Compute an estimate for the rank of the most recent common ancestor (MRCA) that, on average, avoids systematic over- or under-estimation. |
- estimate_rank_of_mrca_maximum_likelihood(coincident_ranks_from_first_disparity_through_first_commonality: Iterator[int], p_differentia_collision: float, prior: PriorBase) float | None [source]
Estimate the most recent common ancestor (MRCA) at the rank with the highest posterior probability.
Parameters
coincident_ranks_from_first_disparity_through_first_commonality : typing.Iterator[int]
Iterator of integer values indicating the coincident ranks between two taxa.
Inclusive to first disparity and first commonality.
- p_differentia_collisionfloat
The multiplicative inverse of the number of possible differentia.
- priorPriorBase
Prior expectation for the distribution of MRCA generation between hereditary stratigraphic columns.
Returns
- typing.Optional[float]
Estimated rank of the MRCA, or None if the two hereditary stratigraphic artifacts definitively share no common ancestor.
Notes
The midpoint rank will be estimated for windows of equal posterior probability.
- estimate_rank_of_mrca_naive(coincident_ranks_from_first_disparity_through_first_commonality: Iterator[int], p_differentia_collision: float, prior: Literal['arbitrary'] | PriorBase) float | None [source]
Compute a simple, fast estimate the rank of the most recent common ancestor (MRCA).
Parameters
coincident_ranks_from_first_disparity_through_first_commonality : typing.Iterator[int]
Iterator of integer values indicating the coincident ranks between two taxa.
Inclusive to first disparity and first commonality.
- p_differentia_collisionfloat
The multiplicative inverse of the number of possible differentia.
- priortyping.Union[typing.Literal[“arbitrary”], PriorBase]
Prior expectation for the distribution of MRCA generation between hereditary stratigraphic columns.
Not used for this calculation.
Returns
- typing.Optional[float]
Estimated rank of the MRCA, or None if the two hereditary stratigraphic artifacts definitively share no common ancestor.
Notes
This function estimates the rank of the MRCA by computing the mean of the first retained disparate rank and the last retained common rank, with a correction factor for upper bound exclusivity.
- estimate_rank_of_mrca_unbiased(coincident_ranks_from_first_disparity_through_first_commonality: Iterator[int], p_differentia_collision: float, prior: PriorBase) float | None [source]
Compute an estimate for the rank of the most recent common ancestor (MRCA) that, on average, avoids systematic over- or under-estimation.
Parameters
- coincident_ranks_from_first_disparity_through_first_commonalitytyping.Iterator[int]
Iterator of integer values indicating the coincident ranks between two taxa.
Inclusive to first disparity and first commonality.
- p_differentia_collisionfloat
The multiplicative inverse of the number of possible differentia.
- priorPriorBase
Prior expectation for the distribution of MRCA generation between hereditary stratigraphic columns.
Returns
- typing.Optional[float]
Estimated rank of the MRCA, or None if the two hereditary stratigraphic artifacts definitively share no common ancestor.