0
$\begingroup$

I have a dataset obtained from a mobile app which is applicable for regression problem since the output values are numerical. I need to predict the numerical values and then predict their classes (High, Medium, Low) in order to provide feedback to the app users. I am using Deep Neural Networks (DNN) separately for regression and multi-class classification. My question is: Is there any way to use DNN to combine regression and classification problems? I need the DNN first to predict the numerical values (using regression) and then predict their classes (using multi-class classification) with the same input features.

$\endgroup$
2
  • $\begingroup$ Could you please clarify in what way the numerical values and the classes are different, that is, whether they are different prediction problems? Is the class just a threshold on the numerical value or is it something else? It is hard to answer your question without more context. $\endgroup$ – Brandmaier Mar 15 at 7:38
  • $\begingroup$ @Brandmaier I have asthma self-management app where test users have taken Asthma Control Tests (ACT) which helps to identify asthma severity. For each ACT score, demography and weather data have been collected. The target of the app is to predict asthma severity for individual users. I have used 2 DNN models; one to predict ACT score using regression, and another to predict asthma severity (high, medium, low) using classification. These classes are extracted from ACT scores. I am required to create one DNN model to predict ACT scores and predict asthma severity simultaneously. Is it possible? $\endgroup$ – Radiah Haque Mar 15 at 15:27
2
$\begingroup$

There are two aspects to this question, a conceptual aspect (what is the goal you want to achieve?) and a technical aspect (how can you achieve the goal?). Let's first look at the technical aspect. Yes, you can have a single DNN that solves a regression (numerical output) and a classification problem (categorical output) at the same time. To this end, you create two output layers, one for the regression output (e.g., with a single linear output) and a second output layer for the classification output (e.g., a one hot coding -- but keep in mind that you have an ordinal output with ordered levels). Then you train the network on the combined loss of both output layers. There you go.

Now, you would have to ask yourself whether this really makes sense. Is the combined loss function really your optimization goal? Does it really make sense to just add the error functions into a total loss function? Or is a given misclassification more costly (in some practically relevant metric of loss) than missing the regression output by some margin. This all has to be considered in coming up with the combined loss function. Lastly, it seems to me that both the regression and classification problem are really the same task. So, if the classification really comes about by just thresholding the regression output, there may be no need to train the classification output separately but you could just postprocess the numeric prediction of the regression DNN.

$\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.