Skip to content

Conversation

@briling
Copy link
Contributor

@briling briling commented Nov 9, 2025

fix and refactor spahm(a)

maybe the slice generator and cursor class make it more complicated, so I can revert

@briling briling requested review from YAY-C and liam-o-marsh November 9, 2025 21:25
@briling
Copy link
Contributor Author

briling commented Nov 9, 2025

to be merged after #115

This was referenced Nov 11, 2025
@briling briling force-pushed the fix-spahm-a branch 3 times, most recently from 590d262 to f2b0ff4 Compare November 17, 2025 13:16
- 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
@briling briling marked this pull request as ready for review November 17, 2025 19:52
Copy link
Contributor

@YAY-C YAY-C left a 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.

Comment on lines 8 to 20
#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))
Copy link
Contributor

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!

Copy link
Contributor Author

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

@briling briling requested a review from YAY-C December 3, 2025 10:51
@briling briling merged commit 6ede655 into master Dec 3, 2025
8 checks passed
@briling briling deleted the fix-spahm-a branch December 3, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants