Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Ravin Kumar
    @canyon289
    Were happy to help either way! Let us know what works for you
    matrixbot
    @matrixbot
    Dominik StaƄczak Hello everyone! (test message for matrix-gitter bridge... 🙂 )
    Dominik StaƄczak Nice, that worked! Hope you don't mind, I didn't want to keep yet another chat client installed :)
    Dominik StaƄczak Anyway, I have a question to you all wonderful folk. This line of arviz code plots a nice clean 2D KDE:
    arviz.plot_kde(trace['T_e'], trace['n_e'], contour=False)

    Dominik StaƄczak But trying to do the same thing with an InferenceData object created from this same trace and PyMC3 model like this:

    arviz.plot_kde(data, var_names = ["T_e", "n_e"])

    results only in a ValueError: Inference Data object detected. Use plot_posterior instead of plot_kde.

    Dominik StaƄczak However, trying the following:

    arviz.plot_posterior(data, var_names=["T_e", "n_e"])

    results in only marginalized 1D KDEs. Is there any way to create a 2D KDE out of InferenceData?

    Oriol Abril-Pla
    @OriolAbril
    Yep, we should probably update the error message. To plot 2D kde plot_pair has to be used
    matrixbot
    @matrixbot
    Dominik StaƄczak Nice, that works well! I'll send in a PR for the error message :0
    Dominik StaƄczak * Nice, that works well! I'll send in a PR for the error message :)
    Dominik StaƄczak Thanks!
    Michael Nowotny
    @michaelnowotny
    @canyon289 Hi Ravin, sorry for the late response. I had not checked back on gitter for a while and then received an email from them today. I think that your suggestion of adding the code to Arviz makes the most sense. I am wondering what unit tests would make sense for this. The obvious one I can think of is constructing a deterministic dictionary of posterior samples, converting it to ArviZ and then checking if the samples are the same.
    Please let me know if the code is ok
    Michael Nowotny
    @michaelnowotny
    I have added an example at the end of the inference data cookbook -> https://github.com/michaelnowotny/arviz/blob/master/doc/notebooks/InferenceDataCookbook.ipynb
    matrixbot
    @matrixbot
    Dominik StaƄczak It probably makes the most sense to start a pull request with those changes! They'll be easier to review then
    Michael Nowotny
    @michaelnowotny
    I created a pull request on GitHub to facilitate code review.
    Michael Nowotny
    @michaelnowotny
    I have addressed some of the pylint warnings in my pull request but don't know how to best resolve the issues surrounding pytest fixtures. Pylint complains that using a fixture in a test function is redefining a name from the outer scope (which it is). Can we safely ignore this or should we find a work-around?
    matrixbot
    @matrixbot
    Dominik StaƄczak Haven't looked at the pr itself but you probably need to add the fixture to the arguments of your test function? I'll try to take a closer look later
    matrixbot
    @matrixbot
    Dominik StaƄczak Hey, I added a note on the PR 🙂 basically just disable that particular linting
    Michael Nowotny
    @michaelnowotny
    Thank you for your suggestion @matrixbot! I have added the first solution from the stack overflow article and will see if the linter passes.
    Daniel Lee
    @syclik
    hi y'all; thanks for the StanCon talk!
    I was wondering if you had any tests for NetCDF files in InferenceData format.
    Ravin Kumar
    @canyon289
    Hey @syclik! Thanks for hosting the whole conference
    When you mean test do you mean unittest or test netcdf files?
    if its test netcdf files theres a couple "precompiled" https://github.com/arviz-devs/arviz/blob/master/arviz/data/datasets.py#L50
    the ones in that url for example
    if its unittests its all in the test folder https://github.com/arviz-devs/arviz/tree/master/arviz/data
    Daniel Lee
    @syclik

    hey @canyon289! Thanks for presenting -- btw, that's for all the people involved. I know these things are team efforts!

    Thanks! That's what I was looking for.

    I'm taking a quick look to see how hard it would be to generate InferenceData NetCDF directly from CmdStan (C++). If it's possible, the next decision would be software design... whether it makes sense to implement directly in CmdStan or whether it makes sense to just write a general C++ library (that conceptually could be at the ArviZ level).
    Daniel Lee
    @syclik
    I'm running into some NetCDF C++ client problems, so... I'm not sure this is going to be straightforward.
    Ravin Kumar
    @canyon289
    For precedent on an external library arviz.jl is an example of an "external" library that provides functionality in another language https://github.com/arviz-devs/ArviZ.jl
    not exactly one of the two options, but from the two you mentioned it sounds like either will work. I'm curious to see which route ends up working better
    Daniel Lee
    @syclik
    me too. Not sure exactly what will work better.
    Sayam Kumar
    @Sayam753
    Hello all. I am new to both gitter and arviz community.
    Sayam Kumar
    @Sayam753
    I am looking for adding log_likelihood in InferenceData from TFP trace. After computing log_likelihood, I am confused whether to add it as a variable in sample_stats or as a separate group. I see it can be possible in both ways. But I am wondering if adding it in a certain way affects underneath computations. Any help in this regard? Thanks
    Ravin Kumar
    @canyon289
    @OriolAbril deferring this one to you
    and @Sayam753 great to see you here :)
    Sayam Kumar
    @Sayam753
    Thanks @canyon289 . Do we have something like discourse as in PyMC for arviz as well?
    I observed this channel for a few days before asking, suspecting if the community has moved to a new place.
    Ravin Kumar
    @canyon289
    No dedicated ArviZ discourse, we actually use the Stan and PyMC discourses for ArviZ pretty regularly :D. You should feel free to post there
    Sayam Kumar
    @Sayam753
    Yeah sure
    Oriol Abril-Pla
    @OriolAbril
    Storing the pointwise log likelihood values in sample_stats has been deprecated and only works for backward compatibility, you should store them in log_likelihood group with the same name as the variable in observed_data and posterior_predictive (if present)
    The cookbook has a good example of this
    And in case it helped, it used to be stored in the sample_stats group with the name log_likelihood, but this approach was not really compatible with multiple likelihood functions nor with custom model comparison tasks which is why this was moved to its own group
    Therefore, everything still works with both options, but the log_likelihood group is preferred and is the only option that supports multiple likelihoods (as seen in this example)
    Sayam Kumar
    @Sayam753
    Thanks @OriolAbril. The resources are awesome. It indeed makes sense to have log_likelihood as a group.
    Sayam Kumar
    @Sayam753
    I have been waiting for a newer release of ArviZ since long. Any updates on this?
    Oriol Abril-Pla
    @OriolAbril
    Now that GSoC has finished a new release should come very soon, not sure exactly when though
    Sayam Kumar
    @Sayam753
    That's awesome.