[Tutor] I Need Help
Micheal Emeagi
michealemeagi at gmail.com
Wed Aug 24 14:12:01 EDT 2016
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 type of weighted moving averaging model
- Part of many forecasting packages; ideal for developing forecasts of
lots of smaller items
- Needs only three numbers:
Ft-1 = Forecast for the period before
current time period t
At-1 = Actual demand for the period
before current time period t
*a* = Weight between 0 and 1
- Formula
- As a gets closer to 1, the more weight put on the most recent demand
number
Exponential Smoothing Forecaset with a = .3
On Wed, Aug 24, 2016 at 5:53 PM, Joaquin Alzola <Joaquin.Alzola at lebara.com>
wrote:
> >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] + alpha * (yt[1] - ft[1]))
>
> > print(ft)
> > ft[1] += 1
> > yt[1] += 1
> >print (ft)
>
> Right now your output is:
> [1, 1, 1.5]
> [1, 2, 1.5, 2.5]
> [1, 3, 1.5, 2.5, 3.5]
> [1, 4, 1.5, 2.5, 3.5, 4.5]
> [1, 5, 1.5, 2.5, 3.5, 4.5, 5.5]
> [1, 6, 1.5, 2.5, 3.5, 4.5, 5.5]
>
> What do you want it to be?
> This email is confidential and may be subject to privilege. If you are not
> the intended recipient, please do not copy or disclose its content but
> contact the sender immediately upon receipt.
>
More information about the Tutor
mailing list