atomica.calibration.calibrate

atomica.calibration.calibrate(project, parset, pars_to_adjust, output_quantities, max_time=60, method='asd', **kwargs)[source]

Run automated calibration

Parameters:
  • project – A project instance to provide data and sim settings

  • parset (ParameterSet) – A ParameterSet instance to calibrate

  • pars_to_adjust – list of tuples, (par_name,pop_name,lower_limit,upper_limit) the pop name can be None, which will be expanded to all populations relevant to the parameter independently, or ‘all’ which will instead operate on the meta y factor. To calibrate a transfer, the parameter name should be set to '<tranfer_code_name>_from_<from_pop>' and then the destination population can be specified as the pop_name. For example, to automatically calibrate an aging transfer ‘age’ from 5-14 to 15-64, the tuple would contain pars_to_adjust=[('age_from_5-14','15-64',...)]

  • output_quantities – list of tuples, (var_label,pop_name,weight,metric), for use in the objective function. pop_name=None will expand to all pops. pop_name=’all’ is not supported

  • max_time – If using ASD, the maximum run time

  • method – ‘asd’ or ‘pso’. If using ‘pso’ all upper and lower limits must be finite

  • kwargs – Dictionary of additional arguments to be passed to the optimization function, e.g. stepsize or pinitial

Return type:

ParameterSet

Returns:

A calibrated ParameterSet