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

[WIP] Add Dataframe to Inference Data Example to cookbook #1556

Merged
merged 3 commits into from Feb 14, 2021

Conversation

Rishabh261998
Copy link
Contributor

@Rishabh261998 Rishabh261998 commented Feb 12, 2021

Description

closes #1490

This is an update on the issue "Add dataframe to InfData examples to cookbook" #1490 I have added the example but there seems to be a problem i.e the created inference object does not have any attributes(eg: created_at, arviz_version). Could you help me tackle this and also provide your feedback. Thanks

@Rishabh261998
Copy link
Contributor Author

Hi, @OriolAbril can you check the PR and provide anything which I need to update and also the problem which I suggested in the description. Thanks

@OriolAbril
Copy link
Member

I would use az.InferenceData(posterior=xdata) like it is done in the snippet in the issue instead of convert_to_inference_data. As we already have Dataset objects, using InferenceData will be more flexible and would allow for example creating multiple groups at once, which convert... does not.

Regarding the attributes, do not worry about it. Attributes are added when converting to xr.Dataset which all the other examples in the notebook do under the hood. Here however, the Dataset is created manually, so attributes will not be present unless they are manually added.

@Rishabh261998
Copy link
Contributor Author

Rishabh261998 commented Feb 13, 2021

Thank You for your feedback @OriolAbril, I will change the convert_to_inference_data to InferenceData(posterior=xdata). I was also wondering about the 3 unsuccessful checks, is it ok for me to ignore them for now?

@OriolAbril
Copy link
Member

Yes, you can ignore them for now

@Rishabh261998
Copy link
Contributor Author

@OriolAbril is there anything more which I need to update? Thanks

@OriolAbril
Copy link
Member

Can you rebase with the latest changes from main and then add a bullet point about the change in the changelog?

@codecov
Copy link

codecov bot commented Feb 14, 2021

Codecov Report

Merging #1556 (b5f615a) into main (263b44f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1556   +/-   ##
=======================================
  Coverage   90.27%   90.27%           
=======================================
  Files         105      105           
  Lines       11397    11397           
=======================================
  Hits        10289    10289           
  Misses       1108     1108           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 263b44f...23975d3. Read the comment docs.

@OriolAbril OriolAbril merged commit f4606e4 into arviz-devs:main Feb 14, 2021
@OriolAbril
Copy link
Member

Thanks @Rishabh261998 !

@Rishabh261998
Copy link
Contributor Author

@OriolAbril I was just going through the CHANGELOG.md file and just found out a typo. The first bullet point in the unreleased version links to the PR 1535 but should link to 1518. Thanks

@OriolAbril
Copy link
Member

Thanks, we can fix this in #1550

utkarsh-maheshwari pushed a commit to utkarsh-maheshwari/arviz that referenced this pull request May 27, 2021
* Added Dataframe to InfData Example

* Changed convert_to_inference_data to InferenceData

* Updated CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add dataframe to InfData examples to cookbook
2 participants