robjhyndman / forecast

Forecasting Functions for Time Series and Linear Models
http://pkg.robjhyndman.com/forecast
1.11k stars 341 forks source link

Updating ets.R to set the seed if seed is not null for reproducibility of results. #882

Closed shruti32 closed 3 years ago

shruti32 commented 3 years ago

If the seed is not null, then it will set the seed to the specified value and will generate reproducible results. I hope this is correct.

robjhyndman commented 3 years ago

Normally setting the seed should be done outside a function to give the user full control. In any case, I don't think there is any randomness used in the ets function so this addition will not change the resulting output. It may change the output from forecast.ets() which does sometimes use simulation to produce prediction intervals.