#NEWLINE# def forecasting_test( self ) : #NEWLINE# #INDENT# 'Test forecast part of ExponentialSmoothing.' #NEWLINE# data = [ [ 0 , 10.0 ] , [ 1 , 18.0 ] , [ 2 , 29.0 ] , [ 3 , 15.0 ] , [ 4 , 30.0 ] , [ 5 , 30.0 ] , [ 6 , 12.0 ] , [ 7 , 16.0 ] ] #NEWLINE# tsSrc = TimeSeries . from_twodim_list ( data ) #NEWLINE# tsSrc . normalize ( 'second' ) #NEWLINE# es = ExponentialSmoothing ( 0.1 , 7 ) #NEWLINE# res = tsSrc . apply ( es ) #NEWLINE# assert ( ( len ( tsSrc ) + 6 ) == len ( res ) )