Skip to content

Feature Request for: MEAN #204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yijunwang0805 opened this issue Oct 15, 2019 · 4 comments
Closed

Feature Request for: MEAN #204

yijunwang0805 opened this issue Oct 15, 2019 · 4 comments

Comments

@yijunwang0805
Copy link

yijunwang0805 commented Oct 15, 2019

Hi Mitchell,

I hope everything is going well for you.

Is it possible to add a specials for model MEAN allowing calculation for a given time interval of the data?

What I hope to do is to combine the mean of the past three months with other models,
borrowing an example from your useR2019 https://slides.mitchelloharawild.com/user2019/#30

aus_travel %>%
  model(
    # overall mean
    MEAN = MEAN(Trips),
    # mean for the past three months
    MEAN_3 = MEAN(Trips, horizon = between(date, '2019-06-01', '2019-08-31'))
  ) %>% 
    # forecast combination
  mutate(
    combn = (MEAN + MEAN_3)/2
  ) %>%
    # forecast
  select(combn) %>%
  forecast(h = 30)

Thank you so much for reading this.

@mitchelloharawild
Copy link
Member

A rolling mean option could be interesting, @robjhyndman do you have any opinions on this?

The way I would represent it is: MEAN(y ~ window(size)

If size = NULL, no window (all the data) will be used.
If size = "3 weeks", then a three week window will be used.

@yijunwang0805
Copy link
Author

yijunwang0805 commented Oct 15, 2019

Yes, what you comment above is exactly what I need (and probably needed by many others)!

@robjhyndman
Copy link
Member

Sounds like a good suggestion to me.

@mitchelloharawild
Copy link
Member

Added in 2ccd6c1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants