def input2d(self, data_path, bound_inf=None, bound_sup=None, sep='\t'): data = np.array(reader_dhc_rs().generic(data_path, df_sep=sep)) shape = data.shape num_samples = shape[0] num_features = shape[1] if bound_inf is not None and bound_sup is not None: x_data = data[:, 0:bound_inf].astype(np.float32) y_data = data[:, bound_sup:num_features].astype(np.float32) return x_data, y_data, num_samples elif bound_inf is None and bound_sup is None: return data, num_samples
def __init__(self, sequence=None, window_size=None, window_aa_ids=None, kind='memconp', patch_size=None): super(irreflexive_dhc_rs, self).__init__(sequence, window_size, window_aa_ids) if kind == 'memconp': self.to_dos = [[4, -4], [4, 4], [3, -4], [-4, 3], [3, 4], [4, 3], [0, -4], [0, 4], [0, -3], [0, 3], [-1, 0], [1, 0], [0, 0], [0, -1], [0, 1], [3, 0], [-3, 0], [4, 0], [-4, 0], [-3, -4], [-4, -3], [-3, 4], [4, -3], [-4, -4], [-4, 4]] if kind == 'patch': self.to_dos = self.patch(length=patch_size) self.num_to_dos = len(self.to_dos) self.reader_dhc_rs = reader_dhc_rs()
def __init__(self): self.pfreader = reader_dhc_rs() self.idr = irreflexive_dhc_rs(None, 2, [-1, -1])
def __init__(self, RELEASE): self.RELEASE = RELEASE self.read = reader_dhc_rs()
def __init__(self): self.read = reader_dhc_rs()
def __init__(self, ): self.pfreader = reader_dhc_rs()