def convert(raw_dir="raw"): xy = np.loadtxt(path.join(raw_dir,"spambase.data"),delimiter=",") x,y = util.split_xy(xy) info['x'] = x info['y'] = y return info
def convert(raw_dir="raw"): xy_list = [np.loadtxt(path.join(raw_dir,name),delimiter=",") for name in ['test.csv','train.csv','validation.csv'] ] xy = np.vstack(xy_list) info['x'], info['y'] = util.split_xy(xy) return info
def convert(raw_dir="raw"): str_mat = np.loadtxt(path.join(raw_dir,"connect-4.data"),delimiter=",",dtype=np.str) str_mat[str_mat == 'o'] = 0 str_mat[str_mat == 'b'] = 1 str_mat[str_mat == 'x'] = 2 str_mat[str_mat == 'loss'] = 0 str_mat[str_mat == 'draw'] = 1 str_mat[str_mat == 'win'] = 2 xy = str_mat.astype(np.float) info['x'], info['y'] = util.split_xy(xy) return info