def plot_cc_empSC_empFC(subjects): results = [] for subject in subjects: empSCnorm, abeta, tau, fMRI = AD_Auxiliar.loadSubjectData(subject) empFC = FC.from_fMRI(fMRI) corr_SC_FCemp = FC.pearson_r(empFC, empSCnorm) print("{} -> Pearson_r(SCnorm, empFC) = {}".format( subject, corr_SC_FCemp)) results.append(corr_SC_FCemp) plt.figure() n, bins, patches = plt.hist( results, bins=6, color='#0504aa', alpha=0.7) #, histtype='step') #, rwidth=0.85) plt.grid(axis='y', alpha=0.75) plt.xlabel('SC weights') plt.ylabel('Counts') plt.title("SC histogram", fontweight="bold", fontsize="18") plt.show()
def findMinMax(arrayValues): return FC.findMinMax(arrayValues)
def postprocess(FCs): FCemp = FC.postprocess(FCs) N = FCemp.shape[0] FCemp2 = FCemp - np.multiply(FCemp, np.eye(N)) GBCemp = np.mean(FCemp2,1) return GBCemp
def accumulate(FCs, nsub, signal): return FC.accumulate(FCs, nsub, signal)
def init(S, N): return FC.init(S, N)
def from_fMRI(signal, applyFilters = True): return FC.from_fMRI(signal, applyFilters=applyFilters)
def FC_Similarity(FC1, FC2): # FC Similarity return FC.FC_Similarity(FC1, FC2)
def pearson_r(x, y): return FC.pearson_r(x, y)
def characterizeConnectivityMatrix(C): return FC.characterizeConnectivityMatrix(C)