So the question asks how to create a model such that you take in input X
and translate this into two simultaneous predictions, one which predicts the breed_category
and pet_category
.
Depending on the number of the classes within the two targets (breed_category
and pet_category
), you could simply concatenate the outputs as one-hot encoded vectors (https://machinelearningmastery.com/why-one-hot-encode-data-in-machine-learning/).
So, you would encode the categories for breed_category
and pet_category
into one-hot encoded vectors and then concatenate them together.
By representing the output like this, you can use a regular feedforward neural network architecture, with a final sigmoid output layer, which maps the output into values between 0 and 1. In this case you cannot use softmax, since you are now predicting two targets simultaneously.
If the number of classes from both targets is large, it might be better to have separate feedforward models, one for breed_category
and pet_category
.
For this, you can then use a softmax final output layer.