1
$\begingroup$

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.

  1. Is it possible to construct a CNN for this task?

  2. How do I deal with the imbalance in training samples for each ordinal level?

$\endgroup$
1
  • $\begingroup$ This paper may be of interest; it shows that you can improve ordinal classification metrics by constraining the output distribution to be unimodal $\endgroup$ – timleathart Feb 5 '18 at 4:41
1
$\begingroup$

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.

$\endgroup$
1
  • 1
    $\begingroup$ Why do you think NNs aren’t ideal for regression tasks? Do you have a source? $\endgroup$ – kbrose Mar 7 '18 at 5:10
1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.