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

align with SRM model doesn't allow different numbers of samples even if num features is the same #410

Open
Tracked by #438
ejolly opened this issue Dec 20, 2022 · 0 comments

Comments

@ejolly
Copy link
Collaborator

ejolly commented Dec 20, 2022

Currently we let the srm external module handle this which throws the error, however this works with method='procrustes' because we manually pad matrices before alignment. @ljchang I thought the probabilistic SRM handled this implicitly but maybe the version we're using is out of date?

aligned = align(subs, method="probabilistic_srm")

[195](file:///home/ejolly/miniconda3/envs/torch/lib/python3.9/site-packages/nltools/external/srm.py?line=194)         assert_all_finite(X[subject])
    [196](file:///home/ejolly/miniconda3/envs/torch/lib/python3.9/site-packages/nltools/external/srm.py?line=195)     if X[subject].shape[1] != number_trs:
--> [197](file:///home/ejolly/miniconda3/envs/torch/lib/python3.9/site-packages/nltools/external/srm.py?line=196)         raise ValueError("Different number of samples between subjects" ".")
    [199](file:///home/ejolly/miniconda3/envs/torch/lib/python3.9/site-packages/nltools/external/srm.py?line=198) # Run SRM
    [200](file:///home/ejolly/miniconda3/envs/torch/lib/python3.9/site-packages/nltools/external/srm.py?line=199) self.sigma_s_, self.w_, self.mu_, self.rho2_, self.s_ = self._srm(X)

ValueError: Different number of samples between subjects.
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

No branches or pull requests

1 participant