def test_ts_kolmogorov(self): func.ts_kolmogorov( self.model.rates_exc[::20, :], self.model.rates_exc, stepsize=250, windowsize=30, )
def model_fit(model, ds, bold_transient=10000, fc=True, fcd=False): result = {} if fc: result["fc_scores"] = [ func.matrix_correlation( func.fc(model.BOLD.BOLD[:, model.BOLD.t_BOLD > bold_transient]), fc) for i, fc in enumerate(ds.FCs) ] result["mean_fc_score"] = np.mean(result["fc_scores"]) if fcd: fcd_sim = func.fcd(model.BOLD.BOLD[:, model.BOLD.t_BOLD > bold_transient]) # if the FCD dataset is already computed, use it if hasattr(ds, "FCDs"): fcd_scores = [ func.matrix_kolmogorov( fcd_sim, fcd_emp, ) for fcd_emp in ds.FCDs ] else: fcd_scores = [ func.ts_kolmogorov( model.BOLD.BOLD[:, model.BOLD.t_BOLD > bold_transient], bold) for bold in ds.BOLDs ] fcd_meanScore = np.mean(fcd_scores) result["fcd"] = fcd_scores result["mean_fcd"] = fcd_meanScore return result
def model_fit(model, ds, bold_transient=10000, fc=True, fcd=False): result = {} if fc: result["fc_scores"] = [ func.matrix_correlation( func.fc(model.BOLD.BOLD[:, model.BOLD.t_BOLD > bold_transient]), fc) for i, fc in enumerate(ds.FCs) ] result["mean_fc_score"] = np.mean(result["fc_scores"]) if fcd: fcd_scores = [ func.ts_kolmogorov( model.BOLD.BOLD[:, model.BOLD.t_BOLD > bold_transient], ds.BOLDs[i]) for i in range(len(ds.BOLDs)) ] fcd_meanScore = np.mean(fcd_scores) result["fcd"] = fcd_scores result["mean_fcd"] = fcd_meanScore return result