1.4. copro.pipeline.run_prediction

copro.pipeline.run_prediction(scaler, main_dict, root_dir, selected_polygons_gdf)[source]

Top-level function to execute the projections. Per specified projection, conflict is projected forwards in time per time step until the projection year is reached. Pear time step, the sample data and conflict data are read individually since different conflict projections are made per classifier used. At the end of each time step, the projections of all classifiers are combined and output metrics determined.

Parameters
  • scaler (scaler) – the specified scaler instance.

  • main_dict (dict) – dictionary containing config-objects and output directories for reference run and all projection runs.

  • root_dir (str) – path to location of cfg-file.

  • selected_polygons_gdf (geo-dataframe) –

Raises

ValueError – raised if another model type than the one using all data is specified in cfg-file.

Returns

containing model output on polygon-basis.

Return type

dataframe