Skip to content

Commit

Permalink
TVB-2728 revert recent change as it does not make sense when reading …
Browse files Browse the repository at this point in the history
…the internal algo code
  • Loading branch information
liadomide committed Jun 12, 2020
1 parent e108b61 commit afd1120
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scientific_library/tvb/analyzers/ica.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ def evaluate(self):
# ICA operates on matrices, here we perform for all state variables and modes
W = numpy.zeros((n_comp, n_comp, n_svar, n_mode)) # unmixing
K = numpy.zeros((n_comp, n_node, n_svar, n_mode)) # whitening matrix
src = numpy.zeros((n_comp, n_time, n_svar, n_mode)) # component time series
src = numpy.zeros((n_time, n_comp, n_svar, n_mode)) # component time series

for mode in range(n_mode):
for var in range(n_svar):
sl = Ellipsis, var, mode
src[sl], W[sl], K[sl] = fastica(data[:, var, :, mode], self.n_components)
K[sl], W[sl], src[sl] = fastica(data[:, var, :, mode], self.n_components)

return mode_decompositions.IndependentComponents(source=self.time_series, component_time_series=src,
prewhitening_matrix=K, unmixing_matrix=W, n_components=n_comp)
Expand Down

0 comments on commit afd1120

Please sign in to comment.