How to train a neural network on multiple objectives? I have a multi-class neural network classifier that has K classes(products). For every row, only one of the classes will be 1 at a time. Now, this approach works fine if I have only 1 objective to optimize i.e Which of these N products was &quot;clicked&quot; by the user.
But how will I solve this problem if I need to optimize on a 2nd objective i.e Which of these N products was &quot;purchased&quot; by the user?
A purchase event is always preceded by a click event. I can obviously solve this problem by training two separate models - 1 for click and the other for purchase. But purchase data is very low as compared to the click data. And we ran the purchase model on production. It did not perform well.
So how do I take both the click and purchase data and frame my problem as &quot;Which of these N products will be clicked and possibly purchased by the user&quot;? and train a single model.
Any sources or papers in this direction will be really helpful.
What you're referring to is called multi-task learning, where your goal is to have a single network learn multiple tasks (in your case &quot;click&quot; and &quot;purchase&quot;).
The benefit of having a single model learn both tasks is that the network can use information extracted for one task to improve its performance on the other.
Technically you need your network to have two output layers (i.e. one for predicting &quot;clicks&quot; and one for &quot;purchases&quot;) and likewise two loss functions (one for each objective). These loss functions usually contribute equally towards the total loss, unless you don't want to consider both tasks of equal importance.
If you're using keras an example for multi-output models can be found here.