Skip to content
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

Improve default GaussianRandomWalk and AR init distributions #5744

Closed
ricardoV94 opened this issue May 5, 2022 · 8 comments · Fixed by #5779 or #5829
Closed

Improve default GaussianRandomWalk and AR init distributions #5744

ricardoV94 opened this issue May 5, 2022 · 8 comments · Fixed by #5779 or #5829

Comments

@ricardoV94
Copy link
Member

When refactoring the GaussianRandomWalk to V4, we set the init to default to Normal(mu, sigma), which does not make much sense. mu is the drift parameter, and says nothing about the expected starting location of the series. sigma probably also makes little sense, as it assumes the uncertainty about the initial location has anything to do with the innovations noise.

Possible alternatives:

  • init = Normal.dist(0, 1)
  • init = Flat.dist(), which was the default in V3, but it means that prior and posterior predictive will fail by default.

We should also rename init to init_dist to emphasize this parameter must de a distribution.

init = Normal.dist(mu, sigma)

A similar question arises in the AR, where we again reuse the innovation noise sigma for the uncertainty about the initial location of the series.

init_dist = Normal.dist(sigma=at.shape_padright(sigma), size=(*sigma.shape, ar_order))

@ricardoV94
Copy link
Member Author

Reopening the issue @twiecki.

After #5779 we are using unit normals as default. Other proposed options:

  1. Use Flat again and let it fail when doing predictive sampling
  2. Use a unit normal with larger sigma
  3. Do not provide a default, user must always specify it.

@ricardoV94 ricardoV94 reopened this May 23, 2022
@twiecki twiecki self-assigned this May 30, 2022
@twiecki
Copy link
Member

twiecki commented May 30, 2022

Decision: Raise warning if not specified, increase standard deviation to 100.

@AlexAndorra
Copy link
Contributor

I'll take this on

@AlexAndorra AlexAndorra self-assigned this May 30, 2022
@lucianopaz
Copy link
Contributor

lucianopaz commented May 30, 2022

Is it Possible to set it to the stationary distribution? At least for the AR?

@twiecki twiecki removed their assignment May 30, 2022
@lucianopaz
Copy link
Contributor

Another alternative is to set it to a Dirac delta at 0

@ricardoV94
Copy link
Member Author

@lucianopaz I think the initial point does not affect the stationarity?

@lucianopaz
Copy link
Contributor

@lucianopaz I think the initial point does not affect the stationarity?

I meant to set the initial distribution to the AR stationary distribution. For AR1 there’s a formula in terms of the coefficients. I don’t know what happens for AR(p) though

@ricardoV94
Copy link
Member Author

ricardoV94 commented May 30, 2022

@lucianopaz I think the initial point does not affect the stationarity?

I meant to set the initial distribution to the AR stationary distribution. For AR1 there’s a formula in terms of the coefficients. I don’t know what happens for AR(p) though

Won't that perhaps introduce very strong constraints on the initial point?

Btw, a DiracDelta would break everything, as no draws would ever be accepted unless we implemented a custom sampler (or transform) for the AR alone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment