def get_w(self, x, confounds): ### extract w values W = [] W2 = [] for ii in range(len(self.st_crm)): W.append(self.st_crm[ii][1].compute_weights( self.st_crm[ii][0].transform(confounds, x[:, ii, :]), mask_part=self.mask_part)) W2.append(self.st_crm[ii][2].compute_weights( self.st_crm[ii][0].transform(confounds, x[:, ii, :]), mask_part=self.mask_part)) xw = np.hstack(W) xw2 = np.hstack(W2) return subtypes.reshapeW(xw), subtypes.reshapeW(xw2)
def get_w(self,x,confounds): ### extract w values W = [] for ii in range(len(self.st_crm)): W.append(self.st_crm[ii][1].compute_weights(self.st_crm[ii][0].transform(confounds,x[:,ii,:]),mask_part=self.mask_part)) xw = np.hstack(W) return subtypes.reshapeW(xw)
def get_w_files(self,files_path,subjects_id_list,confounds): ### extract w values W = [] for ii in range(len(self.st_crm)): x_ref = sbp_util.grab_rmap(subjects_id_list,files_path,ii,dynamic=False) ## compute w values W.append(self.st_crm[ii][1].compute_weights(self.st_crm[ii][0].transform(confounds,x_ref),mask_part=self.mask_part)) del x_ref xw = np.hstack(W) return subtypes.reshapeW(xw)
def get_w_files(self, files_path, subjects_id_list, confounds): ### extract w values W = [] W2 = [] for ii in range(len(self.st_crm)): x_ref = sbp_util.grab_rmap(subjects_id_list, files_path, ii, dynamic=False) ## compute w values W.append(self.st_crm[ii][1].compute_weights( self.st_crm[ii][0].transform(confounds, x_ref), mask_part=self.mask_part)) W2.append(self.st_crm[ii][2].compute_weights( self.st_crm[ii][0].transform(confounds, x_ref), mask_part=self.mask_part)) del x_ref xw = np.hstack(W) xw2 = np.hstack(W2) return subtypes.reshapeW(xw), subtypes.reshapeW(xw2)