Error in docs?

In Bayesian Regression Part 2, when using the predictive, it seems the parameters
were inverted:
Here is the call to the solver:

elbo = svi.step(is_cont_africa, ruggedness, log_gdp)

yet, the predictive call is:

predictive(log_gdp, is_cont_africa, ruggedness)

The below code is in line with the part I of the tutorial. It seems to produce more correct guesses:

num_samples = 1000
predictive = Predictive(model, guide=guide, num_samples=num_samples)
samples_svi = predictive(is_cont_africa, ruggedness, None)
svi_samples = {k: v.reshape(num_samples).detach().cpu().numpy()
               for k, v in samples_svi.items()
               if k not in ["obs"]}

with this call, the results are similar with the part I.

Good catch @Trad! Would you be able to submit a little PR fixing this?

Hum, this is intimidating. Never took part in any Open Source project so far.
I do not even now what PR stands for. It is never too late to learn, however.
It is long overdue and, now is the time to jump in, I guess.
Let me take that plunge. Get a little thrill down the spine from it I must say.

1 Like

@Trad welcome! GitHub has a great set of guides and tutorials on getting started with open source contribution. Here is a section on creating pull requests (PRs).

@eb8680_2: thanks. I shall check your pointers. They might overlap with the ones I found myself.
@fritzo: It looks I have created my first PR and I hope it is correct. Clearly, it should be double checked.

One more thing. While working through the tutorial, I used the Predictive for the MCMC case and display the same results as in Bayesian Regression I. I could easily extend the tutorial if you think it is useful.