Lets say i have a samples taken from veterinary hospital , one of my feature will be the type of the animal and some other features such as fever , size,symptom etc.. , my labels are the medicine given to that animal.

if each medicine is unique to that type of animal (Medicine A should be given to animal A , and there are no Animal B that taken Medicine A) . What will be the cons and pros to building one classifier for the whole data set vs split classifier for each animal (since there wont be valid generalization between animals)


Have run into this problem, when we wanted to run with patient-based deep learning models or individual observations (the same patient could have come several times) based deep learning models.

In your case, they could be analogous to Animal-based model vs general-one-for-all model which has all the animals.

Pros of animal-based:

  • If you are going to build an animal-level classifier, it certainly is going to generalize better when compared to one-model for every animal.

Cons of animal-based:

  • If you don't have enough data for one particular animal, you can't help out much, for that case. This is slightly advantageous as well, I can't say for veterinarian examples, but if you are going to use a general-one-for-all model it might misclassify the prediction as well (because of lack of data for that particular example).

I would suggest you try both. There is nothing certain in this world. Only hunches and guesses from past experiences.

Hope this helps.

  • $\begingroup$ Thank you @tenshi . i have trained an animal-based model for each of the animals and a general model for all animals ,then checked the accuracy for each animal in the general model and it was equal to the one i've got from the animal-based. i'm trying to understand what does it mean .. my hunch is that the trained parameters (logistic regression model) are splitting the animal-space good enough to predict only animal relevant lables $\endgroup$ – Latent Jul 7 '18 at 15:57
  • $\begingroup$ You should try to measure the performance of the model by seeing where it can go wrong. In a general model, if the data isn't that good quality and quantity wise for each class, chances of misclassifying is pretty high. Try to look at AUC, f1 score, for the general model along with plot of confusion matrix. If you have sklearn, you have auc, classification_report and others. Try them please and let me know how it differs. It's always good to know what a model can't do over what a model can do. $\endgroup$ – tenshi Jul 8 '18 at 6:30

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.