tracts.driver_utils.get_starting_ancestry_proportions#

get_starting_ancestry_proportions(demographic_model, model_func, optimizer_start_params)#

Computes and logs the starting ancestry proportions for each set of starting parameters.

Parameters:
  • demographic_model (ParametrizedDemography | ParametrizedDemographySexBiased) – The demographic model for which to compute the starting ancestry proportions.

  • model_func (Callable[[ndarray], dict[str, ndarray]]) – A function that takes in optimizer parameters and returns the migration matrices for those parameters.

  • optimizer_start_params (list[ndarray]) – A list of arrays of starting parameters in optimizer units, where each array corresponds to a set of starting parameters for one repetition of the optimization. The parameters are ordered according to their order in demographic_model.model_base_parameters.