Skip to content

Commit

Permalink
Fixes calculuation of hat values
Browse files Browse the repository at this point in the history
  • Loading branch information
PTNobel committed Dec 12, 2024
1 parent 0abd6cf commit 918a951
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/sherlock_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
L = state.betas.shape[0]
oos = np.empty(L)
ins = np.empty(L)
y_hat_test = X_test @ state.betas.T
y_hat_train = X_train @ state.betas.T
y_hat_test = ad.diagnostic.predict(X_test, state.betas, state.intercepts)
y_hat_train = ad.diagnostic.predict(X_train, state.betas, state.intercepts)
for i in range(L):
oos[i] = loss(torch.from_numpy(y_hat_test[:, i]), torch.from_numpy(y_test))
ins[i] = loss(torch.from_numpy(y_hat_train[:, i]), torch.from_numpy(y_train))
Expand Down

0 comments on commit 918a951

Please sign in to comment.