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

start updating schema doc #2086

Merged
merged 5 commits into from
Dec 27, 2022
Merged

start updating schema doc #2086

merged 5 commits into from
Dec 27, 2022

Conversation

OriolAbril
Copy link
Member

@OriolAbril OriolAbril commented Aug 7, 2022

Description

The goal is to close #230, close #2048 and close #2064. So even though the fix for #230 has already been voted on #2056, I expect some discussion to happen, especially around the rest of the changes.

I have pushed the branch to arviz repo to make it easy for other people to make changes directly. cc @sethaxen

I am also making the changes here for now, which should get the most visibility, we can move the page to the arviz-project repo after merging.

Checklist

  • ✅ Follows official PR format
  • ❌ New features are properly documented (with an example if appropriate)? It is probably time already to rerun the examples, but I don't plan to do it on this PR.
  • 🔲 Changes are listed in changelog

📚 Documentation preview 📚: https://arviz--2086.org.readthedocs.build/en/2086/

@codecov
Copy link

codecov bot commented Aug 7, 2022

Codecov Report

Merging #2086 (a756ed4) into main (0f8c9f7) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2086   +/-   ##
=======================================
  Coverage   89.96%   89.96%           
=======================================
  Files         119      119           
  Lines       12408    12408           
=======================================
  Hits        11163    11163           
  Misses       1245     1245           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@ahartikainen ahartikainen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added couple of comments, questions and fixes

doc/source/schema/schema.md Outdated Show resolved Hide resolved
doc/source/schema/schema.md Outdated Show resolved Hide resolved
doc/source/schema/schema.md Outdated Show resolved Hide resolved
#### `unconstrained_posterior`
Samples from the posterior distribution p(theta_transformed|y) in the unconstrained (also called transformed) space.

Only variables that undergo a transformation for sampling should be present here.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a problematic for Stan where it is easy to calculate the transformation but hard to make sure that transformation is not unity (or is comparing values against each other valid way to do this?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only relative to the samples, so comparing values against each other is perfeclty fine. Even in edgecases like a transformation that is the unity in most of the space but not everywhere, if all the samples are the same then the transformation is not doing anything, we don't need to save the samples in both places; and if we generate new posterior samples, we also need to generate the associated unconstrained samples both of which are generated by the PPLs what will know if and which transformations to do.

Maybe we can write it in a bit more clear phrasing. Not the good style for the doc, but in a conversational style it could be something like: I have the posterior samples and I want to have the unconstrained samples. What are the variables whose
samples I need to replace with different ones? -> those variables and samples are the ones that go in this unconstrained_sample group.

doc/source/schema/schema.md Outdated Show resolved Hide resolved
doc/source/schema/schema.md Outdated Show resolved Hide resolved
doc/source/schema/schema.md Show resolved Hide resolved
doc/source/schema/schema.md Outdated Show resolved Hide resolved
doc/source/schema/schema.md Outdated Show resolved Hide resolved
doc/source/schema/schema.md Show resolved Hide resolved
doc/source/schema/schema.md Outdated Show resolved Hide resolved
doc/source/schema/schema.md Outdated Show resolved Hide resolved
doc/source/schema/schema.md Outdated Show resolved Hide resolved
@sethaxen
Copy link
Member

Sorry for the delay @OriolAbril ! I will review later today.

@OriolAbril
Copy link
Member Author

I would like to merge this before the holidays if someone can review 🙏🏿

Copy link
Contributor

@ahartikainen ahartikainen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@sethaxen sethaxen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a few minor (and optional) suggestions. Merge when you feel it's ready!

doc/source/schema/schema.md Outdated Show resolved Hide resolved
* `inference_library`: the library used to run the inference.
* `inference_library_version`: version of the inference library used.

Metadata can be stored at the whole `InferenceData` level but also at group level when needed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have any recommendations yet as to which metadata fields belong in groups vs InferenceData?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not yet, I'll open an issue for this

doc/source/schema/schema.md Outdated Show resolved Hide resolved
OriolAbril and others added 5 commits December 27, 2022 18:37
Co-authored-by: Seth Axen <seth.axen@gmail.com>
Co-authored-by: Ari Hartikainen <ahartikainen@users.noreply.github.com>
Co-authored-by: Seth Axen <seth@sethaxen.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants