pywatts.modules.postprocessing package

Submodules

pywatts.modules.postprocessing.ensemble module

class pywatts.modules.postprocessing.ensemble.Ensemble(weights: Union[str, list] = None, k_best: Union[str, int] = None, loss_metric: pywatts.modules.postprocessing.ensemble.Ensemble.LossMetric = <LossMetric.RMSE: 1>, name: str = 'Ensemble')

Bases: pywatts.core.base.BaseEstimator

Aggregation step to ensemble the given time series, ether by simple or weighted averaging. By default simple averaging is applied.

class LossMetric

Bases: enum.IntEnum

Enum which contains the different loss metrics of the ensemble module.

MAE = 2
RMSE = 1
fit(**kwargs)

Fit the model, e.g. optimize parameters such that model(x) = y

Parameters:kwargs – key word arguments as input. If the key word starts with target, then it is a target variable.
Returns:
get_params() → Dict[str, object]

Get parameters for the Ensemble object. :return: Parameters as dict object. :rtype: Dict[str, object]

set_params(weights: Union[str, list] = None, loss_metric: pywatts.modules.postprocessing.ensemble.Ensemble.LossMetric = None, k_best: Union[str, int] = None)

Set or change Ensemble object parameters. :param weights: List of individual weights of the given forecasts for weighted averaging. Passing “auto” estimates the weights depending on the given loss values. :type weights: list, optional :param loss_metric: Specifies the loss metric for automated optimal weight estimation. :type loss_metric: LossMetric, optional :param k_best: Drop poor forecasts in the automated weight estimation. Passing “auto” drops poor forecasts based on the given loss values by applying the 1.5*IQR rule. :type k_best: str or int, optional

transform(**kwargs) → xarray.core.dataarray.DataArray

Ensemble the given time series by simple or weighted averaging. :return: Xarray dataset aggregated by simple or weighted averaging. :rtype: xr.DataArray

Module contents