Skip to content

Commit

Permalink
fixed some minor indexing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ihincks committed Aug 8, 2018
1 parent 5094e77 commit 4b93447
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qinfer/derived_models.py
Expand Up @@ -464,7 +464,7 @@ def likelihood(self, outcomes, modelparams, expparams):
assert np.all(sigma > 0)

# Now we can rescale the outcomes to be random variates z drawn from N(0, 1).
scaled_outcomes = (outcomes - mu) / sigma
scaled_outcomes = (outcomes[np.newaxis,:,np.newaxis,np.newaxis] - mu) / sigma

# We can then compute the conditional likelihood Pr(z | underlying_outcome, model).
conditional_L = norm(0, 1).pdf(scaled_outcomes)
Expand All @@ -491,7 +491,7 @@ def simulate_experiment(self, modelparams, expparams, repeat=1):
# Next, we sample a bunch of underlying outcomes to figure out
# how to rescale everything.
underlying_outcomes = self.underlying_model.simulate_experiment(
modelparams[:, :-4], expparams
modelparams[:, :-4], expparams, repeat=repeat
)

# We can now rescale zs to obtain the actual outcomes.
Expand Down

0 comments on commit 4b93447

Please sign in to comment.