I am using the Moving Average icon to apply the simple exponential smoothing model, and it is asking me for a window size. Unless I am horribly mistaken, there is no window size... instead one has to find the optimum value of alpha.

Yes, you are right. I was in this node using a trick I found online.

I calculate alpha as 2/(k+1) where k is the windowsize. this is how you can control alpha using the "window size".

The formulas can be found in the Node Description as well.

Best, Iris

1 Like

Ha !! I would have never thought of that !!! Thanks-- Harry

1 Like

@Iris

So based on this formula if I set as window size = 1 then alpha should also be 1?

In that case the result should be the same as using the naive model. However what I’m getting is the same output as the input. Am I missing something?

Right now it calculates like this:

```
Simple_exponential_0 = v_0
EMA(v,n) = Simple_exponential_n = alpha*v_n + (1-alpha)*Simple_exponential_n-1
```

From my understanding now this is not correct and should be `alpha*v_n-1 + (1-alpha)*Simple_exponential_n-1`

since otherwise the function will return the input if alpha is set to 1.

For the record: Exponential smoothing - Wikipedia

→ Right now it uses the general exponential smooting formula and not the simple exponential smoothing.

So basically, setting window size to 1 just does not make a lot of sense here, but why should we change the function because of it? A window size of 1 also for other models will return the input.