rwgen.RainfallModel.set_statistics

RainfallModel.set_statistics(point_metadata=None, reference_statistics=None, fitted_statistics=None, simulated_statistics=None)

Set statistics and related attributes.

Parameters:
  • point_metadata (pandas.DataFrame or str) – Required for a spatial model. See RainfallModel class docstring for explanation.

  • reference_statistics (pandas.DataFrame or str) – Reference statistics for model fitting and/or evaluation as dataframe (or path to file). Also used in simulation for a spatial model. Optional (depending on subsequent workflow).

  • fitted_statistics – Optional.

  • simulated_statistics – Optional.

Notes

If dataframe is passed it is currently assumed that lag and threshold columns are present.

Setting statistics with this method updates the self.statistic_definitions, self.point_metadata and self.phi attributes, as well as the relevant statistics attribute (e.g. self.reference_statistics).

No checks are currently made on the different statistics arguments or their consistency with the point_metadata argument.

For identifying (updating) self.statistic_definitions, order of priority is reference > fitted > simulated.

Strongly recommended that self.reference_statistics is set either here or via self.preprocess(), as it is required for both fitting and simulation.