- Adaptive Expectation transformation [Cheng, 2008]

This commit is contained in:
Petrônio Cândido de Lima e Silva 2017-04-20 15:07:34 -03:00
parent 55638cbe20
commit e5c2e0dcbd

View File

@ -60,6 +60,26 @@ class Differential(Transformation):
return inc return inc
class AdaptiveExpectation(Transformation):
def __init__(self, parameters):
super(AdaptiveExpectation, self).__init__(parameters)
self.h = parameters
def apply(self, data, param=None):
return data
def inverse(self, data, param):
n = len(data)
inc = [param[t] + self.h*(data[t] - param[t]) for t in np.arange(0, n)]
if n == 1:
return inc[0]
else:
return inc
def boxcox(original, plambda): def boxcox(original, plambda):
n = len(original) n = len(original)
if plambda != 0: if plambda != 0: