8000 SRM doesn't apply mu in transform() · Issue #406 · brainiak/brainiak · GitHub
[go: up one dir, main page]

Skip to content

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

Open

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.

Activity

  1. cameronphchen commented on Jan 14, 2019

    @cameronphchen
    Contributor

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

  2. removed their assignment
    on Jan 23, 2019
  3. added this to the v0.11.1 milestone on Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0