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 coords argument to plot_density #832

Closed

Conversation

rpgoldman
Copy link
Contributor

Not sure that this works properly yet. I'm kind of concerned about letting people specify coords to a function that accepts an Iterable of InferenceData, instead of just a single InferenceData.

Are we really sure we are confident in plotting multiple InferenceData? It seems like it might make the meaning of various parameters uncertain. Mightn't it be better to just have the caller loop over the data sets instead of having arviz do it autonomously?

@rpgoldman rpgoldman force-pushed the coords-arg-for-density branch 3 times, most recently from 06c526a to 814c208 Compare September 27, 2019 19:51
if coords is None:
coords = {}
datasets = [
get_coords(convert_to_dataset(datum, group=group), coords) for datum in data
Copy link
Member

Choose a reason for hiding this comment

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

I think this will probably break if one of the inference data objects has a coordinate the other doesn't, which currently is one possibility in plot_density. Using inference data sel method instead of dataset sel will solve the issue with coordinate names by applying only the existing ones, but the case of mismatching coordinate values would not be solved.

As I do not think this will be a common case, maybe the best option is to create a helper function in densityplot.py itself in order to take this 2 possibilities into account?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure what to do about this. Maybe it would help to articulate what limits we put on the set of InferenceData objects we accept here? Without doing something like that, I don't see how we can say whether or not this function will plot correctly.

To be honest, I'm not sure what is gained by permitting a set of InferenceData here instead of requiring the user to invoke this function multiple times, once per InferenceData object. Presumably the issue is for model comparison, but I'm afraid I'm just guessing.

Because I don't know what is the answer to that, I don't know how to think about what we need to support here.

@canyon289
Copy link
Member

Checking in on old PRs. Any possibility of bringing this over the line or should we close?

@canyon289
Copy link
Member

Closing this for now. If its still active and needs to be reopened feel free to do so!

@canyon289 canyon289 closed this Jun 14, 2020
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.

None yet

3 participants