def save_params(self, filepath): GCCA.save_params(self, filepath) if len(self.z_p) != 0: with h5py.File(filepath, 'a') as f: f.create_dataset("z_p", data=self.z_p) f.flush()
def __init__(self, n_components=2, reg_param=0.1): GCCA.__init__(self, n_components, reg_param) self.cca1 = CCA(self.n_components, self.reg_param) self.cca2 = CCA(self.n_components, self.reg_param) self.z_list = []
def load_params(self, filepath): GCCA.load_params(self, filepath) with h5py.File(filepath, "r") as f: if "z_p" in f: self.z_p = f["z_p"].value f.flush()
def __init__(self, n_components=2, reg_param=0.1): GCCA.__init__(self, n_components, reg_param) # log setting program = os.path.basename(__name__) self.logger = logging.getLogger(program) logging.basicConfig(format='%(asctime)s : %(name)s : %(levelname)s : %(message)s') self.z_p = np.array([])
def __init__(self, n_components=2, reg_param=0.1): GCCA.__init__(self, n_components, reg_param) # log setting program = os.path.basename(__name__) self.logger = logging.getLogger(program) logging.basicConfig( format='%(asctime)s : %(name)s : %(levelname)s : %(message)s') self.z_p = np.array([])
def __init__(self, n_components=2, reg_param=0.1): GCCA.__init__(self, n_components, reg_param)