Data Science Asked by Dynamic Stardust on May 31, 2021
How do we design a CNN for ordinal classification?
I am trying to analyze plant leaf images for diseases. I’ve got the disease type classification working. Now we need to classify the magnitude of the disease affliction on a scale of 1 to 10 (ordinal scale), where 1 is almost no trace of diseased parts on the leaf and 10 is completely diseased.
Is it possible to construct a CNN for this task?
How do I deal with the imbalance in training samples for each ordinal level?
NN aren't ideal for regression tasks.
I'd train 10 networks, one for each magnitude.
CNN #k would be a binary classifier predicting whether the magnitude is k or less
In other words, CNN #10 is a function that always returns 1, and CNN#0 is the binary classifier you've already trained.
Answered by Uri Goren on May 31, 2021
Use the same model you trained for the classification task, and append it with 10 logistic units which indicates respectively whether if the magnitude is k or less, as previously suggested.
As for the imbalance problem, you could pick your batch examples to have equal probability for all the classes.
An intuitive explanation:
Class A contains 10 examples while class B contains 90 examples. duplicate each example of the class A eight times, and then shuffle both classes examples, then during training, keep sampling from a uniform distribution.
Of course, you don't need to duplicate the example data explicitly, just keep a list of indices mapped to your input vectors and start duplicating from there.
Answered by Fadi Bakoura on May 31, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP