Bases: pycast.common.pycastobject.PyCastObject
Baseclass for all smoothing and forecasting methods.
Initializes the BaseMethod.
Parameters: |
|
---|
Returns the intervals for the methods parameter.
Only parameters with defined intervals can be used for optimization!
Returns: | Returns a dictionary containing the parameter intervals, using the parameter
name as key, while the value hast the following format:
[minValue, maxValue, minIntervalClosed, maxIntervalClosed]
|
---|---|
Return type: | dictionary |
Returns the ValueError message for the given parameter.
Parameters: |
|
---|---|
Returns: | Returns a string containing hte message. |
Return type: | string |
Returns if the parameter is within its valid interval.
Parameters: |
|
---|---|
Returns: | Returns True it the value for the given parameter is valid, False otherwise. |
Return type: | boolean |
Returns if the method can already be executed.
Returns: | Returns True if all required parameters where already set, False otherwise. |
---|---|
Return type: | boolean |
Executes the BaseMethod on a given TimeSeries object.
Parameters: | timeSeries (TimeSeries) – TimeSeries object that fullfills all requirements (normalization, sortOrder). |
---|---|
Returns: | Returns a TimeSeries object containing the smoothed/forecasted values. |
Return type: | TimeSeries |
Raise: | Raises a NotImplementedError if the child class does not overwrite this function. |
Returns the interval for a given parameter.
Parameters: | parameter (string) – Name of the parameter. |
---|---|
Returns: | Returns a list containing with [minValue, maxValue, minIntervalClosed, maxIntervalClosed].
If no interval definitions for the given parameter exist, None is returned.
|
Return type: | list |
Returns a forecasting parameter.
Parameters: | name (string) – Name of the parameter. |
---|---|
Returns: | Returns the value stored in parameter. |
Return type: | numeric |
Raise: | Raises a KeyError if the parameter is not defined. |
Returns a list with the names of all required parameters.
Returns: | Returns a list with the names of all required parameters. |
---|---|
Return type: | list |
Returns if the TimeSeries has to be normalized or not.
Returns: | Returns True if the TimeSeries has to be normalized, False otherwise. |
---|---|
Return type: | boolean |
Returns if the TimeSeries has to be sorted or not.
Returns: | Returns True if the TimeSeries has to be sorted, False otherwise. |
---|---|
Return type: | boolean |
Sets a parameter for the BaseMethod.
Parameters: |
|
---|
Bases: pycast.methods.basemethod.BaseMethod
Basemethod for all forecasting methods.
Initializes the BaseForecastingMethod.
Parameters: |
|
---|---|
Raise: | Raises a ValueError when valuesToForecast is smaller than zero. |
Calculates the number of values, that need to be forecasted to match the goal set in forecast_until.
This sets the parameter “valuesToForecast” and should be called at the beginning of the BaseMethod.execute() implementation.
Parameters: | timeSeries (TimeSeries) – Should be a sorted and normalized TimeSeries instance. |
---|---|
Raise: | Raises a ValueError if the TimeSeries is either not normalized or sorted. |
Sets the forecasting goal (timestamp wise).
This function enables the automatic determination of valuesToForecast.
Parameters: |
|
---|
Returns a list with optimizable parameters.
All required parameters of a forecasting method with defined intervals can be used for optimization.
Returns: | Returns a list with optimizable parameter names. |
---|---|
Return type: | list |
Todo: | Should we return all parameter names from the self._parameterIntervals instead? |