pcas = list()
// Do PCAs and CCAs
for subject_data in data:
subject_data -= subject_data.mean(axis=0)
// PCA
std = subject_data.std(axis=0)
std[std==0] = 1
subject_data /= std
subject_data = subject_data.T
subject_data = self.memory.cache(linalg.svd)(subject_data,
full_matrices=False)[0]
subject_data = subject_data[:, :2 * self.n_components]
After Change
data = copy.deepcopy(data)
pcas = Parallel(n_jobs=self.n_jobs, verbose=self.verbose)(
delayed(subject_pca)(subject_data,
n_components=self.n_components, mem=self.mem)
for subject_data in data)
pcas = np.concatenate(pcas, axis=1)
if self.kurtosis_thr is None: