Hello everyone,
I am tackling a multiclass classification problem related to the activity of some drugs using Pytorch Geometric neural network, I have three activity classes (0, 1 and 2), to tackle the problem I have adopted the one vs. one approach, thus creating three binary classifiers: 0 vs. 1, 1 vs. 2 and 2 vs. 0. After creating the three classifiers I have trained and optimized them, now my question is, how can I concatenate the outputs of the three classifiers to get the prediction? I tried to do a simple average among the three predictions getting poor results, although the three classifiers are well trained, and individually achieve high performance
Thank you all for your help!
Hi Gianmarco,
What does your task look like?
Is it a multi-class (single-label) problem where one and only one class out of 0, 1, 2 is the right answer?
Or is it a multi-class multi-label problem where a data point could belong to one or more than one classes?
In any case, you may not need to train 3 separate classifiers. Rather, you could try modifying your network such that the output layer has three nodes and use a suitable loss function - CrossEntropyLoss
in the former case, and BCEWithLogitsLoss
in the latter.
Hi @srishti-git1110, thank you for your response.
It is a multi-class problem, my dataset is composed of drugs and the label (0, 1, 2) represents a class of activity against cancer. I have already tried to train a single classifier using CrossEntropyLoss
as a loss function, but I didn’t get very good results. The main problem is that in my dataset I have compounds that are very similar structurally but often have different labels (I attach an image in the post)