Skip to content

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

@qihongl

Description

@qihongl

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions