cost_function: The cost function fed to Nelder-Mead.

Description Usage Arguments Value See Also

View source: R/fitting.R

Description

We want Nelder-Mead to run fast so the cost function operates with the column reduced edge optimisation matrix and does not give any extra information about the fit. For the details, use edge_optimisation_function instead.

Usage

1
2
cost_function(data, concentration, matrix, graph,
  parameters = extract_graph_parameters(graph), iteration_multiplier = 3)

Arguments

data

The data set.

concentration

The Cholesky decomposition of the inverted covariance matrix.

matrix

A column reduced edge optimisation matrix (typically given by the function build_edge_optimisation_matrix).

graph

The admixture graph.

parameters

In case one wants to tweak something in the graph.

iteration_multiplier

Given to mynonneg.

Value

Given an input vector of admix variables, returns the smallest error regarding the edge variables.

See Also

mynonneg

edge_optimisation_function

log_likelihood


mailund/admixture_graph documentation built on May 21, 2019, 11:06 a.m.