Skip to content

Feature Request for: MEAN #204

Description

@yijunwang0805

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions