dpyverification.scores.categorical#
Categorical scores, based on a 2x2 contingency table.
For verification of non-probabilistic forecasts, and historical simulations of discrete variables.
For references, see: https://scores.readthedocs.io/en/stable/included.html#categorical.
Functions
|
Given data and thresholds, compute the binary events. |
Classes
|
Categorical scores, based on the 2x2 contingency table. |
|
Config to compute categorical scores, based on an event definition. |
- class dpyverification.scores.categorical.CategoricalScores(config)[source]#
Categorical scores, based on the 2x2 contingency table.
For reference: https://scores.readthedocs.io/en/stable/included.html#categorical
- Parameters:
config (CategoricalScoresConfig)
- config_class#
alias of
CategoricalScoresConfig
- class dpyverification.scores.categorical.CategoricalScoresConfig(*, reduce_dims=<factory>, score_adapter, general, verification_pair_ids=[], events, scores, return_contingency_table=True, **extra_data)[source]#
Config to compute categorical scores, based on an event definition.
- Parameters:
reduce_dims (list[Literal[StandardDim.station, StandardDim.forecast_reference_time, StandardDim.forecast_period]])
score_adapter (Literal[ScoreKind.categorical_scores])
general (Annotated[GeneralInfoConfig, SkipJsonSchema()])
events (list[ThresholdEvent])
scores (list[SupportedCategoricalScores])
return_contingency_table (bool)
extra_data (Any)
- scores: Annotated[list[SupportedCategoricalScores], FieldInfo(annotation=NoneType, required=True, description='For reference, see: https://scores.readthedocs.io/en/stable/api.html#module-scores.categorical.')]#
- events: Annotated[list[ThresholdEvent], FieldInfo(annotation=NoneType, required=True, description="A list of threshold event definitions. For each event, a categorical score will be computed. A threshold event is defined by a threshold and an operator. The threshold is a string that corresponds to a threshold id defined in the configuration. The operator defines how the threshold is applied to the data to create the event. For example, if the threshold is '10' and the operator is 'greater_than', the event will be created by applying the operator to the data and the threshold, i.e. data > 10. ")]#