import argparse import numpy as np import pandas as pd import scipy as sci from functions import data from functions import settings as sett from scipy.optimize import linear_sum_assignment from functions import TCA as t from sklearn.metrics import r2_score torch.set_default_tensor_type('torch.cuda.FloatTensor') # Load parameters param = sett.params() paths = sett.paths() ar = sett.arguments() args = ar.get_arguments() fixed_selection = ar.get_fixed_args() def paring_r2(X, Y): """Perform linear sum assignment based on R2 scores Parameters ---------- X : array Factor to compare Y: array
import pandas as pd import tensorly as tl from functions import plot from functions import data from functions import preprocessing as prepro from functions import settings as sett from functions import tca_utils as tca import matplotlib.pyplot as plt from tqdm import tqdm from tensorflow.python.framework.ops import disable_eager_execution tl.set_backend('pytorch') torch.set_default_tensor_type('torch.cuda.FloatTensor') params = sett.params() paths = sett.paths() ar = sett.arguments() args = ar.get_arguments() preprocess_sett = ar.get_preprocess_sett() animal = ar.get_animal() path = os.path.join(paths.path2Figures, 'Preprocessed Data', animal) if args.plotting: try: os.makedirs(path) except: FileExistsError # Loading data from folder