Re: [Tutor] I Need Help

2016-08-24 Thread Steven D'Aprano
On Wed, Aug 24, 2016 at 11:26:07AM +0100, Micheal Emeagi wrote: > yt = [1,2,3,4,5,6] > ft = [yt[0],yt[0]] > alpha = 0.5 > while len(ft) != len(yt) + 1: > ft.append(ft[1] + alpha * (yt[1] - ft[1])) > print(ft) > ft[1] += 1 > yt[1] += 1 > > print (ft) I think that your intention is

Re: [Tutor] I Need Help

2016-08-24 Thread Micheal Emeagi
This is what it is suppose to be [1, 1, 1.5] [1, 1, 1.5, 2.25] [1, 1, 1.5, 2.25, 3.125] [1, 1, 1.5, 2.25, 3.125, 4.06] [1, 1, 1.5, 2.25, 3.125, 4.06, 5.03] The model below is what I want to implement.I chose alpha to be 0.5. The model below chose 0.3. What is Exponential Smoothing? - A

Re: [Tutor] I Need Help

2016-08-24 Thread Joaquin Alzola
>I want the elements of ft to increment by one while I use it to generate the >subsequent element. But for some reasons I don't understand, it keeps changing >the second element in Ft. >yt = [1,2,3,4,5,6] >ft = [yt[0],yt[0]] >alpha = 0.5 >while len(ft) != len(yt) + 1: >ft.append(ft[1] +

Re: [Tutor] I Need Help

2016-08-24 Thread Alan Gauld via Tutor
On 24/08/16 11:26, Micheal Emeagi wrote: > forcast values. Ft is the forcast list whose length should be one element > greater than the Yt list. I want the elements of ft to increment by one > while I use it to generate the subsequent element. But for some reasons I > don't understand, it keeps