Commit e108062a authored by Alessia Marcolini's avatar Alessia Marcolini
Browse files

Fix reading labels type

parent 910072b4
......@@ -89,13 +89,12 @@ le = preprocessing.LabelEncoder()
# load data
sample_names_tr, var_names_tr, x_tr = load_data(TR_TOPFEATS)
y_tr = pd.read_csv(LABELSFILE, sep='\t', header=None).values
y_tr = pd.read_csv(LABELSFILE, sep='\t', header=None, dtype=str).values
y_tr = le.fit_transform(y_tr)
sample_names_ts, var_names_ts, x_ts = load_data(TS_TOPFEATS)
# load the TS labels if available
if TSLABELSFILE is not None:
y_ts = pd.read_csv(TSLABELSFILE, sep='\t', header=None, dtype=str).values
y_ts = pd.read_csv(TSLABELSFILE, header=None, dtype=str).values
y_ts = le.transform(y_ts)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment