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

SRM doesn't apply mu in transform() #406

Open
qihongl opened this issue Jan 13, 2019 · 1 comment · May be fixed by #495
Open

SRM doesn't apply mu in transform() #406

qihongl opened this issue Jan 13, 2019 · 1 comment · May be fixed by #495
Labels
Milestone

Comments

@qihongl
Copy link
Member

qihongl commented Jan 13, 2019

I recently did a simulation and realized that brainiak SRM can't align two trajectories that different by a vector shift, though probabilistic SRM should be able to align them by estimating the correct mu.

Here's the notebook containing the simulation. By commenting/uncommenting some code block, the notebook can show that
i) the shifting can be fixed by doing mean centering 1st
ii) SRM can fix rotational difference (i.e. trajectory 2 = some orthogonal transformation of trajectory 1), as expected

@cameronphchen thinks there is a bug. Here's what he said:
"
I think this might be due to this line

s[subject] = self.w_[subject].T.dot(X[subject])

In the implementation, because fMRI data is usually preprocessed by z-scoring, seems like the re-centering part wasn't properly taken care of. If you change the above line to be W^T(X-mu), you should be able to get the expected results.
"

We tried it, which indeed fixed the issue. I can make a PR later, but thought I would make a note first.

@cameronphchen
Copy link
Contributor

@qihongl Thank you so much for catching this and for reporting the bug!! Appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants