tracts.driver_utils.check_optimal_sex_bias_parameters_at_boundaries#
- check_optimal_sex_bias_parameters_at_boundaries(demographic_model, driver_spec, sex_bias_param_names, remainder_params, optimal_params)#
Checks whether the optimal sex-bias parameters have values at the border of the feasible region, up to a pre-specified tolerance. If any sex-bias parameter has an optimal value at the border, the function raises a warning to suggest a re-run with fixed values.
- Parameters:
demographic_model (
ParametrizedDemography|ParametrizedDemographySexBiased) – The demographic model for which to check the optimal parameters.driver_spec (
InferenceConfig) – The configuration for the inference process, as specified in the driver file.sex_bias_param_names (
list[str]) – A list of parameter names corresponding to sex-bias parameters in the demographic model.remainder_params (
dict[str,float]) – A dictionary of derived parameters for the ‘remainder’ (dependent) ancestry in each parametrized population, as computed bycompute_remainder_params.optimal_params (
ndarray) – The final optimal parameters in physical units, as returned by the optimization process.
- Returns:
A list of parameter names that have optimal values at the boundary of the feasible region.
- Return type:
list[str]