def run_estimation(self, estimation_config, model_name, save_estimation_results=True): config = Baseline() config.merge(estimation_config) config['config_changes_for_estimation'] = ConfigChangesForEstimation() logger.start_block('Estimating %s' % model_name) try: estimator = UrbansimEstimationRunner( models[model_name][0], specification_module=models[model_name][1], model_group=models[model_name][2], configuration=config, save_estimation_results=save_estimation_results ) estimator.estimate() finally: logger.end_block()
def run_estimation(self, estimation_config, model_name, save_estimation_results=True): config = Baseline() config.merge(estimation_config) config['config_changes_for_estimation'] = ConfigChangesForEstimation() logger.start_block('Estimating %s' % model_name) try: estimator = UrbansimEstimationRunner( models[model_name][0], specification_module=models[model_name][1], model_group=models[model_name][2], configuration=config, save_estimation_results=save_estimation_results) estimator.estimate() finally: logger.end_block()
"dplcm-residential": [ "development_project_location_choice_model", "washtenaw.estimation.DPLCM_specification", "residential", ], "rlsm": ["residential_land_share_model", "washtenaw.estimation.RLSM_specification", None], } model = "hlcm" # model = 'elcm-industrial' # model = 'elcm-commercial' # model = 'elcm-homebased' # model = dplcm-industrial' # model = 'dplcm-commercial' # model ='dplcm-residential' # model = 'lpm' # model = 'rlsm' config = Baseline() config.merge(my_configuration) config["config_changes_for_estimation"] = ConfigChangesForEstimation() estimator = EstimationRunner( models[model][0], specification_module=models[model][1], model_group=models[model][2], configuration=config, save_estimation_results=False, ) estimator.estimate() # estimator.reestimate()
models = { 'hlcm': ['household_location_choice_model', 'washtenaw.estimation.HLCM_specification', None], 'elcm-industrial': ['employment_location_choice_model', 'washtenaw.estimation.ELCM_specification', 'industrial'], 'elcm-commercial': ['employment_location_choice_model', 'washtenaw.estimation.ELCM_specification', 'commercial'], 'elcm-home_based': ['employment_location_choice_model', 'washtenaw.estimation.ELCM_specification', 'home_based'], 'lpm': ['land_price_model', 'washtenaw.estimation.LPM_specification', None], 'dplcm-industrial': ['development_project_location_choice_model', 'washtenaw.estimation.DPLCM_specification', 'industrial'], 'dplcm-commercial': ['development_project_location_choice_model', 'washtenaw.estimation.DPLCM_specification', 'commercial'], 'dplcm-residential': ['development_project_location_choice_model', 'washtenaw.estimation.DPLCM_specification', 'residential'], 'rlsm': ['residential_land_share_model', 'washtenaw.estimation.RLSM_specification', None], } model = 'hlcm' #model = 'elcm-industrial' #model = 'elcm-commercial' #model = 'elcm-homebased' #model = dplcm-industrial' #model = 'dplcm-commercial' #model ='dplcm-residential' #model = 'lpm' #model = 'rlsm' config = Baseline() config.merge(my_configuration) config['config_changes_for_estimation'] = ConfigChangesForEstimation() estimator = EstimationRunner(models[model][0], specification_module=models[model][1], model_group=models[model][2], configuration=config, save_estimation_results=False) estimator.estimate() #estimator.reestimate()