cost_function that doesn't optimize the edge variables
but has them as an argument instead.
log_likelihood(f, concentration, matrix, graph, parameters = extract_graph_parameters(graph))D from data).build_edge_optimisation_matrix).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 \pi S)^{-1/2} e^{-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).
cost_function