Likelihood (CPU)¶
CPU reference implementation of Felsenstein's pruning algorithm.
log_likelihood
¶
Compute total log-likelihood via the Felsenstein pruning algorithm.
The total is the sum over the site patterns of each pattern's
log-likelihood, from :func:pattern_log_likelihoods, weighted by the
number of sites that show it. The weighted sum is float64.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tree
|
HifukuTree
|
|
required |
alignment
|
Alignment - patterns uint8 (n_local, n_patterns),
|
|
required |
model
|
EigenDecomp
|
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
total log-likelihood (sum over all sites)
|
|