Skip to content

Commit

Permalink
[FIX] Normalize data to zero mean and unit variance before dimension …
Browse files Browse the repository at this point in the history
…estimation (#636)

* Normalize data to zero mean and unit variance in ma_pca

* Use normalized data as input to ma_pca

* Revert first change: do not re-scale input in ma_pca

* Use consistent normalization strategy in ma_pca

* Remove outdated comments

* Update regression test data; normalization produces fewer figures

* Normalize along spatial dimension in mapca; Matches GIFT

* Update test output; updated mapca finds 3 more components
  • Loading branch information
notZaki committed Feb 5, 2021
1 parent 14be852 commit f8802df
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tedana/decomposition/ma_pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,9 +478,7 @@ def ma_pca(data_nib, mask_nib, criteria='mdl'):
maskvec = np.reshape(mask_nib, Nx * Ny * Nz, order='F')
data_non_normalized = data_nib_V[maskvec == 1, :]
scaler = StandardScaler(with_mean=True, with_std=True)
# TODO: determine if tedana is already normalizing before this
data = scaler.fit_transform(data_non_normalized) # This was X_sc
data = data_non_normalized

LGR.info('Performing SVD on original OC data...')
V, EigenValues = _icatb_svd(data, Nt)
Expand Down

0 comments on commit f8802df

Please sign in to comment.