0
$\begingroup$

enter image description hereI have a dataset where there are two target variables target-1 and target-2.

Both target variables are ordinal and thus I want to develop a multi-class classification model over these two target variables. However, I am unsure as to where to start in the model creation process. Therefore, if someone could give some pointers to this, that would be greatly appreciated.

Thanks in advance.

$\endgroup$
  • $\begingroup$ Thank you for your question. Just to clarify you have a dataset (could you edit your post and include examples of your input?) and you want to predict a class for each of the target variables? Or are the target variables the classes themselves? $\endgroup$ – shepan6 Aug 4 at 9:04
  • $\begingroup$ Hi, I have added a few data points of the dataset. There "breed_category" and "pet_category" are the target variables. I have experience working on single dependent variable but have no experience working on a multi-output variable dataset. So my question here is what process should be followed to create a classification model. The two target variables are multi-class variables so I would prefer classification model creation. $\endgroup$ – Kartik Rayaprolu Aug 4 at 9:11
1
$\begingroup$

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.

| improve this answer | |
$\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.