Skip to content

Commit

Permalink
add models for pystan tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ahartikainen committed Dec 29, 2018
1 parent 7e381d9 commit 5712b6d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions arviz/tests/test_data.py
Expand Up @@ -357,10 +357,8 @@ def get_inference_data(self, data, eight_school_params):
"""vars as str."""
return from_pystan(
posterior=data.obj,
posterior_model=data.model,
posterior_predictive="y_hat",
prior=data.obj,
prior_model=data.model,
prior_predictive="y_hat",
observed_data="y",
log_likelihood="log_lik",
Expand All @@ -372,6 +370,8 @@ def get_inference_data(self, data, eight_school_params):
"y_hat": ["school"],
"eta": ["school"],
},
posterior_model=data.model,
prior_model=data.model,
)

def get_inference_data2(self, data, eight_schools_params):
Expand All @@ -394,6 +394,8 @@ def get_inference_data2(self, data, eight_schools_params):
"eta": ["school"],
"log_lik": ["log_likelihood_dim"],
},
posterior_model=data.model,
prior_model=data.model,
)

def get_inference_data3(self, data, eight_schools_params):
Expand All @@ -406,6 +408,8 @@ def get_inference_data3(self, data, eight_schools_params):
observed_data="y",
coords={"school": np.arange(eight_schools_params["J"])},
dims={"theta": ["school"], "y": ["school"], "y_hat": ["school"], "eta": ["school"]},
posterior_model=data.model,
prior_model=data.model,
)

def get_inference_data4(self, data):
Expand All @@ -418,6 +422,8 @@ def get_inference_data4(self, data):
observed_data="y",
coords=None,
dims=None,
posterior_model=data.model,
prior_model=data.model,
)

def test_sampler_stats(self, data, eight_schools_params):
Expand Down

0 comments on commit 5712b6d

Please sign in to comment.