tracts.driver_utils.get_time_scaled_model_bounds#
- get_time_scaled_model_bounds(model, verbose=False)#
Computes a function that takes in optimizer parameters, converts them to physical parameters using the model’s parameter handler, and returns the violation score for those parameters. This is necessary because some optimizers may require parameters to be on a different scale (e.g. log scale) than the physical parameters used in the model, so this function serves as a wrapper to apply the necessary transformations before passing parameters to the model.
- Parameters:
(ParametrizedDemography) (model)
(bool) (verbose)
- Returns:
Callable[[np.ndarray], float]
- Return type:
A function that takes in optimizer parameters, converts them to physical parameters, and returns the violation score for those parameters.