From 76617281b69a3358337467223dafb209237ee8d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=C3=B4nio=20C=C3=A2ndido=20de=20Lima=20e=20Silva?= Date: Wed, 13 Jan 2021 15:05:40 -0300 Subject: [PATCH] Update smoothing.py --- pyFTS/common/transformations/smoothing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyFTS/common/transformations/smoothing.py b/pyFTS/common/transformations/smoothing.py index 73988ef..1f6a052 100644 --- a/pyFTS/common/transformations/smoothing.py +++ b/pyFTS/common/transformations/smoothing.py @@ -11,7 +11,7 @@ class MovingAverage(Transformation): def apply(self, data, param=None, **kwargs): steps = param if param is not None else self.steps ma = [k for k in data[:steps]] - ma.extend([np.mean(data[k-steps:k]) for k in range(q, len(data))]) + ma.extend([np.mean(data[k-steps:k]) for k in range(steps, len(data))]) return ma def inverse(self, data, param=None, **kwargs): @@ -38,4 +38,4 @@ class ExponentialSmoothing(Transformation): return mm def inverse(self, data, param=None, **kwargs): - return data \ No newline at end of file + return data