I'm trying to predict the possible diagnosis given a consultation reason. I have ID's for all the data. So my data kind of looks like below

Reason            | Diagnosis
448, 124          | 9
551, 448, 122     | 9, 12
111, 110          | 32
143               | 43

There can be up to 10 reasons and upto 5 diagnoses in my training data.

What I'm looking for in the algorithm or model is that it accepts 1 - 10 reason_ids as input and returns top 5 possibilities for diagnosis with % of probability.

I'm good at python so if there is any open source model or code I can look at it will be great.

  • 3
    $\begingroup$ Use a multi-class multi-label classifier, let the diagnosis be the output classes, and the reason be the binary inputs (0 if the reason does not apply). Use this. $\endgroup$ – Emre Sep 14 '17 at 17:12

You could approach this in two ways:

Intuitively, it's like trying to infer rules such that: if the reasons are X and Y, the diagnosis will likely be Z.

The most common algorithm is Apriori, which is easy to implement.

  • Classification/Supervised learning

Your features could be binary (0 if reason X is not applied, 1 if it is). You could have one for each reason, and even combination of reasons etc. You might run into some issues if you have many possible reasons (your features will be very sparse).

If this is the case, I'd look into dimensionality reduction to make your features denser.


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.