I have a dataset concerning patients with information about their diseases and symptoms. I want to estimate probability of $P(disease_i = TRUE|symptom_j = TRUE)$. My intuition is that I should use a Naïve Bayes classifier, but every example I've found applies Naïve Bayes when there's only one disease (like predicting the probability of heart attack).
My data looks like this:
patient | disease | if_disease_present | symptom 1 | d1 | TRUE | s1 2 | d1 | FALSE | s2 3 | d2 | TRUE | s1 4 | d3 | TRUE | s4 5 | d4 | FALSE | s8 ...
My idea was to split data according to diseases and build the number of naive Bayesian models how many unique diseases I have in my data, but I have doubts if it's proper method.
UPDATE: Assume that I want to predict probability $P(X|Y)$. It's clear for me how to use R's implementation of Naïve Bayes when my $X$ is for example cancer/not cancer or a/b/c/d (or like here where $X$ is binary).
My difficult is "how to estimate $P(X|Y)$ when $X$ is more "complex". In my data I would like to predict conditional probability of some diseases (let's say number d3) when this disease is present under some symptom; because I have also rows with patients who were tested if they suffer from d3 but for whom the value of if_disease_present for d3 is $FALSE$.
FURTHER UPDATE: I would like to consider the presence/absence of all unique diseases in ONE model. Every patient could be connected with more than one disease and could have it or not.