Description Usage Arguments Value See Also
Or the log likelihood of the observation, given graph with parameters, depending how things are modeled.
Basically this is just cost_function
that doesn't optimize the edge variables
but has them as an argument instead.
1 2 | log_likelihood(f, concentration, matrix, graph,
parameters = extract_graph_parameters(graph))
|
f |
The observed f statistics (the column |
concentration |
The Cholesky decomposition of the inverted covariance matrix. So if S is the covariance matrix, this is C = chol(S^(-1)) satisfying S^(-1) = C^t*C. |
matrix |
A column reduced edge optimisation matrix (typically given by the function
|
graph |
The admixture graph. Here to give default value for: |
parameters |
Just because we need to know variable names. |
The output is a function. Given admixture proportions x
and edge lengths e
, the graph
topology T implies an estimate F for the statistics f. This output function
calculates
l = (F-f)^t*S^(-1)*(F-f)
from x
and e
. Up to a constant error and multiplier that is a log likelihood function, as
det(2*π*S)^(-1/2)*exp(-l/2)
can be seen as a likelihood of a graph with parameters, given the observation, or the other way around (possibly up to a normalization constant).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.