credit.ensemble.crps
====================

.. py:module:: credit.ensemble.crps


Functions
---------

.. autoapisummary::

   credit.ensemble.crps.calculate_crps_per_channel


Module Contents
---------------

.. py:function:: calculate_crps_per_channel(ensemble_predictions: torch.Tensor, y_true: torch.Tensor) -> torch.Tensor

   Calculate CRPS score for each channel.

   :param ensemble_predictions: Tensor of shape
                                [ensemble_size, 1, channels, 1, height, width] containing ensemble forecasts.
   :type ensemble_predictions: torch.Tensor
   :param y_true: Tensor of shape [1, channels, 1, height, width] with
                  the true values.
   :type y_true: torch.Tensor

   :returns:

             CRPS scores with shape [channels], where each score is
                 averaged over the ensemble.
   :rtype: torch.Tensor


