-
Notifications
You must be signed in to change notification settings - Fork 5
Fix spahm a #116
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
Fix spahm a #116
Conversation
|
to be merged after #115 |
590d262 to
f2b0ff4
Compare
- fix maxlen - add test for mr2021 - fix short versions for only_z
- fix SAD DM for open-shell - fix tests so they test SAD-diff
YAY-C
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few comments that we can remove, I think.
and maybe the trimming of the vectors is unnecessary (in test), but needs to be checked.
tests/test_kernels.py
Outdated
| #np.random.seed(666) | ||
| #X = np.random.rand(2,4) | ||
| #Y = np.random.rand(2,4) | ||
| #K_G_good = np.zeros((len(X),len(Y))) | ||
| #K_L_good = np.zeros((len(X),len(Y))) | ||
| #for i, x in enumerate(X): | ||
| # np.random.seed(666) | ||
| # X = np.random.rand(2,4) | ||
| # Y = np.random.rand(2,4) | ||
| # K_G_good = np.zeros((len(X),len(Y))) | ||
| # K_L_good = np.zeros((len(X),len(Y))) | ||
| # for i, x in enumerate(X): | ||
| # for j, y in enumerate(Y): | ||
| # K_G_good[i,j] = np.dot(x-y, x-y) | ||
| # K_L_good[i,j] = np.sum(abs(x-y)) | ||
| #np.exp(-K_G_good/2, out=K_G_good) | ||
| #np.exp(-K_L_good/2, out=K_L_good) | ||
| #K_dot_good = np.dot(X, Y.T) | ||
| #K_cos_good = K_dot_good / np.outer(np.linalg.norm(X, axis=1), np.linalg.norm(Y, axis=1)) | ||
| # np.exp(-K_G_good/2, out=K_G_good) | ||
| # np.exp(-K_L_good/2, out=K_L_good) | ||
| # K_dot_good = np.dot(X, Y.T) | ||
| # K_cos_good = K_dot_good / np.outer(np.linalg.norm(X, axis=1), np.linalg.norm(Y, axis=1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@briling I'm not exactly sure why it's there, but I think we can remove this too!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wanted to keep it to show how the "true" data was generated
fix and refactor spahm(a)
maybe the slice generator and cursor class make it more complicated, so I can revert