pyobsmod.Dataset.compute_stats#

Dataset.compute_stats(which_stats: Sequence[str] | dict[str, Any], names: Sequence[str] | None = None) Series#

Compute a list of statistics parameters.

Parameters:
  • which_stats (Sequence[str] | dict[str, Any]) – Sequence of the statistics parameters to compute or alternatively a dictionary with the statistics parameters as keys and the arguments that are passed to the method as values.

  • names (Sequence[str] | None) – Sequence of the names of the statistics parameters. If None, the names are taken from the keys of the which_stats dictionary.

Returns:

stats – A list of the statistic parameters.

Return type:

pandas.Series

Examples

from pyobsmod import load_dataset_example

ds = load_dataset_example()
print(ds.compute_stats(['rmse', 'nrmse']))
rmse     0.189830
nrmse    0.095968
dtype: float64