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

Fixed sc.chol_sample bug in ModelF discrepancy #27

Merged
merged 1 commit into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions impala/superCal/models_withLik.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ def discrep_sample(self, yobs, pred, cov, itemp): #Added by Lauren on 11/17/23.
+ self.D.T @ (cov['inv'].flatten() * np.eye(len(yobs))) @ self.D
)
m = self.D.T @ (cov['inv'] * np.eye(len(yobs))) @ (yobs - pred)
discrep_vars = sc.chol_sample(S @ m, S/itemp)
discrep_vars = chol_sample(S @ m, S/itemp)
return discrep_vars


Expand Down Expand Up @@ -540,7 +540,7 @@ def discrep_sample(self, yobs, pred, cov, itemp): #Added by Lauren on 11/17/23.
+ self.D.T @ self.vmat
)
self.m = self.D.T @ self.vec
discrep_vars = sc.chol_sample((S @ self.m).flatten(), S/itemp)
discrep_vars = chol_sample((S @ self.m).flatten(), S/itemp)
return discrep_vars
def llik(self, yobs, pred, cov): # assumes diagonal cov
self.vec = yobs.flatten() - pred.flatten()
Expand Down
Loading