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

Use xarray-dataset to save all data #19

Closed
ahartikainen opened this issue Aug 16, 2018 · 2 comments
Closed

Use xarray-dataset to save all data #19

ahartikainen opened this issue Aug 16, 2018 · 2 comments

Comments

@ahartikainen
Copy link
Contributor

I think we should store all the data from the sampling straight to xarray.Dataset. This way the results are in a compact place and we have a good way to access it.

Not sure should also store functions there or only the data.

See. e.g. arviz-devs/arviz#97

@ahartikainen
Copy link
Contributor Author

Or maybe we could still use a dictionary, but save with the same format

{'theta' : arr}
# arr is ndarray
arr.shape = (chain, draw, *shape)

Or

{'theta' : arr}
# arr is List of ndarray
arr[i].shape = (draw, *shape)

Or

[{'theta' : arr}]
# arr is ndarray
arr.shape = (draw, *shape)

Then we can easily transform to xarray.Dataset.

Should we try and kick some tyres, now the version is 3.0.x alpha?

cc. @mkcor

@ahartikainen
Copy link
Contributor Author

I think with arviz.from_pystan works, so we can keep Fit object as a simple numpy object.

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

No branches or pull requests

1 participant