Skip to content

Instantly share code, notes, and snippets.

@utkarsh-maheshwari
Last active September 8, 2022 07:14
Show Gist options
  • Save utkarsh-maheshwari/8d4cd2fd84c763bf85291c3f0881d588 to your computer and use it in GitHub Desktop.
Save utkarsh-maheshwari/8d4cd2fd84c763bf85291c3f0881d588 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@canyon289
Copy link

If you feel like youre done prototyping the next thing you should do is move this into a PR in ArviZ. notably adding many tests. This answers the first question and the last question.

For finding bugs writing tests with hell both you and us find bugs if any exist.

At a glance it looks good but I have some questions about the api. This however will be easier to assess with a full test suite and when part of PR.

None of this is to say this isnt great work! IMO youre right on track and really appreciate the way youre doing this.

@utkarsh-maheshwari
Copy link
Author

Thank you! Reviews are very helpful and encouraging for me be they positive or negative.
Not sure if prototyping is enough but since functions output something, I am gonna open a PR.
I'll get more reviews there 😋

@mattiasthalen
Copy link

Not sure if this has been abandoned. But I tried it in colab with just the prior predictive.

It failed due to this:

groups = ["posterior_predictive", "prior_predictive"]

I removed that and modified the loop to check for groups with _predictive in its name:

for group in groups:
    if '_predictive' in group:
        item = getattr(data, group)
        if y_ppc in item and y_ppc_group is None:
            y_ppc_group = group
        elif y_ppc in item:
            print("Warning, duplicate variable names for y_ppc, "
            "using variable from group {}".format(y_ppc_group))

Unfortunately it crashed.

@utkarsh-maheshwari
Copy link
Author

Hi @mattiasthalen! Did you try plot_lm function? This gist is just a prototype.

@mattiasthalen
Copy link

@utkarsh-maheshwari no, I stumbled on this when googling. But I did now and it seems to work good :)

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