I have a PHP/MySQL application that stores symptoms and the appropriate drug. What machine learning algorithm should I use to predict the drug for any symptoms. Also, what would be the format of the training set?

Features: 2 (not numeric, string/character) Samples: More than 100 No Missing Values

The Labelled data would be as follows: A combination of symptoms relate to a combination of drugs. So,

(symptom1, symptom2, symptom3) --> (drug1, drug2)

(symptom1, symptom2, symptom4) --> (drug2, drug3, drug4)

In general, one ( or more than one ) symptom links to one ( or more than one ) drug:

(symptom1, etc...) --> (drug1, etc ...)

  • $\begingroup$ In the real world, I'd worry about interactions. I.e. you might learn that (symp1, symp2, symp3, symp4) --> (drug1, drug2, drug3, drug4) but drug1 and drug3 combined will kill you. $\endgroup$ – Wayne Feb 21 '13 at 15:54
  • $\begingroup$ Even without drug interactions, there are complicated symptom interactions. (Fever, sore throat) -> cold -> go to bed and rest but (Fever, sore throat, pus on tonsils) -> strep throat -> need antibiotics or run the risk of severe complications. I don't think there is an algorithm with an acceptable performance here else medicine would be a lot easier. $\endgroup$ – Erik Feb 21 '13 at 16:06
  • $\begingroup$ @Erik IBM Watson is close they say. :) $\endgroup$ – curious_cat Mar 5 '13 at 18:09

In order for us to answer, we need more information: 1. How many samples and how many features do you have? 2. How many drugs (classes)? 3. Are the features all numeric? Are there missing values? 4. Is the data balanced? (i.e. Do you expect to have the same probability for each drug?) 5. Do you have labeled data? (samples with symptoms for which you know the drug)

A sample dataset (even with synthetic data) could also help.


After your added description, I can think of a few alternatives:

  1. Use a classifier that can handle categorical values. Start with Naive Bayes and then proceed maybe to Bayesian Networks.
  2. Use Association Rules to learn more about the relations between symptoms.
| cite | improve this answer | |
  • $\begingroup$ I have updated the question with specifics, answering some of your questions. $\endgroup$ – tank Feb 21 '13 at 15:39

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.