climpred.metrics.Metric.__init__

climpred.metrics.Metric.__init__#

Metric.__init__(name: str, function: Callable, positive: bool | None, probabilistic: bool, unit_power: float, long_name: str | None = None, aliases: List[str] | None = None, minimum: float | None = None, maximum: float | None = None, perfect: float | None = None, normalize: bool = False, allows_logical: bool = False, requires_member_dim: bool = False)[source]#

Metric initialization. See Metrics.

Parameters:
  • name – name of metric.

  • function – metric function.

  • positive – Is metric positively oriented? If True, higher skill value means better skill. If False, lower metric value means better skill. None if different differentiation.

  • probabilistic – Is metric probabilistic? False means deterministic.

  • unit_power – Power of the unit of skill based on unit of input, e.g. input unit [m]: skill unit [(m)**unit_power]

  • long_name – long name of metric. Defaults to None.

  • aliases – Allowed aliases for this metric. Defaults to None.

  • min – Minimum skill for metric. Defaults to None.

  • max – Maxmimum skill for metric. Defaults to None.

  • perfect – Perfect skill for metric. Defaults to None.

  • normalize – Will the metric be normalized? Then metric function will require to get Comparison passed. Defaults to False.

  • allows_logical – Does the metric allow a logical to be passed in metric_kwargs? Some probabilistic metrics allow this. Defaults to False.

  • requires_member_dim – Does xskillscore.metric expect a member dimension? Defaults to False.