This commit is contained in:
Petrônio Cândido 2021-01-13 15:32:21 -03:00
commit cb71bee2bc

View File

@ -11,7 +11,7 @@ class MovingAverage(Transformation):
def apply(self, data, param=None, **kwargs): def apply(self, data, param=None, **kwargs):
steps = param if param is not None else self.steps steps = param if param is not None else self.steps
ma = [k for k in data[: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 return ma
def inverse(self, data, param=None, **kwargs): def inverse(self, data, param=None, **kwargs):