@@ -339,31 +339,18 @@ def is_normalized(self):
339
339
"""
340
340
return self ._normalized
341
341
342
- def smooth (self , smoothingMethod ):
343
- """Applies the given SmoothingMethod from the pycast.smoothing module to the TimeSeries.
344
-
345
- @param smoothingMethod SmoothingMethod that should be applied to the time series.
346
- For more information about the smoothing methods look into
347
- their corresponding documentation in the pycast.smoothing module.
348
-
349
- @return Returns a new TimeSeries containing the smoothed values.
342
+ def apply (self , method ):
343
+ """Applies the given ForecastingAlgorithm or SmoothingMethod from the pycast.forecasting and
344
+ pycast.smoothingmodule to the TimeSeries.
345
+
346
+ @param method Method that should be used with the TimeSeries.
347
+ For more information about the methods take a look into
348
+ their corresponding documentation.
350
349
"""
351
- print self
352
350
## sort and normalize, if necessary
353
- if smoothingMethod .has_to_be_normalized ():
351
+ if method .has_to_be_normalized ():
354
352
self .normalize ()
355
- elif smoothingMethod .has_to_be_sorted ():
353
+ elif method .has_to_be_sorted ():
356
354
self .sort_timeseries ()
357
-
358
- print self
359
- return smoothingMethod .execute (self )
360
-
361
- def apply_forecasting (self , forecastingAlgorithm ):
362
- """Applies the given ForecastingAlgorithm from the pycast.forecasting module to the TimeSeries.
363
-
364
- @param forecastingAlgorithm ForecastingAlgorithm that should be used with the TimeSeries.
365
- Fore more information about the forecasting algorithms look into
366
- their corresponding documentation in the pycasst.forecasting module.
367
- """
368
- ## @todo This is not implemetned yet.
369
- ## @todo Check, if this interface definition works good with GridSearch or HookeJeaves opimization.
355
+
356
+ return method .execute (self )
0 commit comments