atomica.calibration

Implements automatic calibration

This module defines the perform_autofit function, which is the entry-point for automatic calibration

Functions

perform_autofit(project, parset, …[, max_time]) Run an autofit and save resulting parameterset
atomica.calibration._calc_fractional(y_obs, y_fit)[source]
atomica.calibration._calc_meansquare(y_obs, y_fit)[source]

Calcs the RMS error.

Note: could also use implementation from sklearn in future …

atomica.calibration._calc_wape(y_obs, y_fit)[source]

Calculates the weighted absolute percentage error

atomica.calibration._calculate_fitscore(y_obs, y_fit, metric='meansquare')[source]
atomica.calibration._calculate_objective(y_factors, pars_to_adjust, output_quantities, parset, project)[source]
atomica.calibration._get_fitscore_func(metric)[source]
atomica.calibration._update_parset(parset, y_factors, pars_to_adjust)[source]
atomica.calibration.perform_autofit(project, parset, pars_to_adjust, output_quantities, max_time=60)[source]

Run an autofit and save resulting parameterset

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.
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