sidhomj/DeepTCR

KNN_Repertoire_Classifer Error

hejing3283 opened this issue · 2 comments

Input data structure
6 labels, each label has 4 files, I tried, folds= 4, folds = 5, and folds = 10, all return the same error.

command is

DTCRU.KNN_Repertoire_Classifier(folds=10,
Load_Prev_Data=False,
metrics=['AUC', 'F1', 'Recall', 'Precision'],
plot_metrics=True, plot_type='box',
by_class=False,
n_jobs=40)

error msg start -----------------------------

File "/home/ubuntu/anaconda3/envs/dl/lib/python3.6/site-packages/DeepTCR/DeepTCR.py", line 2290, in KNN_Repertoire_Classifier
sns.catplot(data=df_out, x='Metric', y='Value', kind=plot_type)
File "/home/ubuntu/anaconda3/envs/dl/lib/python3.6/site-packages/seaborn/categorical.py", line 3724, in catplot
p.establish_colors(color, palette, 1)
File "/home/ubuntu/anaconda3/envs/dl/lib/python3.6/site-packages/seaborn/categorical.py", line 315, in establish_colors
lum = min(light_vals) * .6
ValueError: min() arg is an empty sequence

error msg end -----------------------------

this seems like an issue with seaborn... hmm, i'm not sure exactly what's going on. does the method work with by_class is set to True?

No.
I think I figured out the question. The file names under each directory need to be unique across all files, Otherwise they are going to be over-written.
I renamed all files for each class. Now it seems to work.