pywatts.modules.metrics package¶
Submodules¶
pywatts.modules.metrics.mean_absolute_error module¶
pywatts.modules.metrics.rolling_mae module¶
-
class
pywatts.modules.metrics.rolling_mae.RollingMAE(name: str = None, window_size=24, window_size_unit='d')¶ Bases:
pywatts.modules.metrics.rolling_metric_base.RollingMetricBaseModule to calculate the Rolling Mean Absolute Error (MAE) :param window_size: Determine the window size for the rolling mae. Default 24 :type window_size: int :param window_size_unit: Determine the unit of the window size. Default Day (d)” :type window_size_unit: str
pywatts.modules.metrics.rolling_metric_base module¶
-
class
pywatts.modules.metrics.rolling_metric_base.RollingMetricBase(name: str = None, window_size=24, window_size_unit='d')¶ Bases:
pywatts.core.base.BaseTransformer,abc.ABCModule to calculate a Rolling Metric :param window_size: Determine the window size for the rolling metric. Default 24 :type window_size: int :param window_size_unit: Determine the unit of the window size. Default Day (d)” :type window_size_unit: str
-
get_params() → Dict[str, object]¶ Returns a dict of parameters used in the RollingMetric.
Returns: Parameters set for the RollingMetric Return type: Dict[str, object]
-
set_params(window_size=None, window_size_unit=None)¶ Set the parameter for the RollingMetric.
Parameters: - window_size (int) – Determine the window size if a rolling metric should be calculated. Ignored if rolling is set to False. Default 24
- window_size_unit (str) – Determine the unit of the window size. Default Day (d)”
-
transform(y: xarray.core.dataarray.DataArray, **kwargs) → xarray.core.dataarray.DataArray¶ Calculates the MAE based on the predefined target and predictions variables.
Parameters: x (Optional[xr.DataArray]) – the input dataset Returns: The calculated MAE Return type: xr.DataArray
-
pywatts.modules.metrics.rolling_rmse module¶
-
class
pywatts.modules.metrics.rolling_rmse.RollingRMSE(name: str = None, window_size=24, window_size_unit='d')¶ Bases:
pywatts.modules.metrics.rolling_metric_base.RollingMetricBaseModule to calculate the Rolling Root Mean Squared Error (RMSE) :param window_size: Determine the window size of the rolling rmse. Default 24 :type window_size: int :param window_size_unit: Determine the unit of the window size. Default Day (d)” :type window_size_unit: str