8.6. copro.evaluation.polygon_model_accuracy

copro.evaluation.polygon_model_accuracy(df, global_df, make_proj=False)[source]

Determines a range of model accuracy values for each polygon. Reduces dataframe with results from each simulation to values per unique polygon identifier. Determines the total number of predictions made per polygon as well as fraction of correct predictions made for overall and conflict-only data.

Parameters
  • df (dataframe) – output dataframe containing results of all simulations.

  • global_df (dataframe) – global look-up dataframe to associate unique identifier with geometry.

  • make_proj (bool, optional) – whether or not this function is used to make a projection. If True, a couple of calculations are skipped as no observed data is available for projections. Defaults to ‘False’.

Returns

dataframe and geo-dataframe with data per polygon.

Return type

(geo-)dataframe