Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multi-output neural network combining regression and classification

If you have both a classification and regression problem that are related and rely on the same input data, is it possible to successfully architect a neural network that gives both classification and regression outputs?

If so, how might the loss function be constructed?

like image 321
jayesian Avatar asked May 24 '16 19:05

jayesian


People also ask

Can you combine regression and classification?

A simple approach is to develop both regression and classification predictive models on the same data and use the models sequentially. An alternative and often more effective approach is to develop a single neural network model that can predict both a numeric and class label value from the same input.

Can neural networks be used for regression and classification?

Neural networks are flexible and can be used for both classification and regression.

Can a neural network have multiple outputs?

Neural network models can be configured for multi-output regression tasks.

Can neural networks be used for multiclass classification?

The changes are as follows: The output layer contains one neuron per class rather than just one neuron. If the dataset contains four classes, then the output layer has four neurons.


1 Answers

Usually, for such cases the loss is considered simply a weighted sum of classification loss and regression loss. In other words, your network have 2 independent output parts, one responsible for regression, on which you apply reggression loss L_reg (such as MSE) and another responsible for classification part, on which you apply classification loss L_class (such as cross entropy) and your final optimization criterion is simply (alpha)*L_reg + (1-alpha)*L_class, for some predefined alpha. This allows easy computation of gradients (and overall easy analysis).

like image 64
lejlot Avatar answered Sep 23 '22 09:09

lejlot