tracts.driver_utils.get_time_scaled_model_func#
- get_time_scaled_model_func(model)#
Computes a function that takes in optimizer parameters, converts them to physical parameters using the model’s parameter handler, and returns the migration matrices 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)
- Returns:
Callable[[np.ndarray], dict[str, np.ndarray]]
- Return type:
Callable[[ndarray],dict[str,ndarray]]