Data Science Asked by ayushsubedi on May 24, 2021
For image classification problems like cat vs dogs, the output layer is 2.
Image classification problems like diabetic retinopathy seem to be more of a grading classifier. Although the targets range from 0 to 4, (signifying the severity of the condition), is it better to have 1 as the output layer, or 5, for these kinds of problems?
I have seen Kaggle kernels where both are utilized.
The number of outputs will depend on the task and the number of targets. In the case of medical grading, you can either interpret the problem as:
Make sure to check the loss function for each task. That will usually tell you how the code writer decided to approach the problem. To come back to your example, the first task should have a classification loss (crossentropy for instance) and the second a regression (MSE). Also check for the last layer activation function: usually softmax/sigmoid for classification and None for regression.
It's complicated to say what would work without seeing the data. A recent competition (Janestreet Market predicition) also saw people approach the problem both as a classification and a regression. The highest rated public notebook on the private set so far is a regression-based approach. I suspect that this happened because the classification (of whether a stock is going to have a positive return in the future) requires to binarize the labels which basically lead to information loss.
Correct answer by RonsenbergVI on May 24, 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