Answers.Body: <p>Medical diagnosis often employs <a href="https://en.wikipedia.org/wiki/Abductive_reasoning" rel="nofollow noreferrer">abductive inference</a> (also known as "inference to the best explanation"), and automated approaches to abductive reasoning have been applied to medical diagnosis.  More concretely, a mechanism known as <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2244953/" rel="nofollow noreferrer">Parsimonious Covering Theory</a> has been extensively researched as an approach to automated abductive reasoning in medical scenarios (among others).  You might consider giving that a look.  </p>
  
  <p>FWIW, one of the main researchers in the field is <a href="https://www.cs.umd.edu/~reggia/" rel="nofollow noreferrer">Professor James Reggia</a> from UMD.  He and <a href="https://www.csee.umbc.edu/~ypeng" rel="nofollow noreferrer">Yun Peng</a> wrote a very accessible book on the subject - <a href="http://rads.stackoverflow.com/amzn/click/B000QCQWL8" rel="nofollow noreferrer">Abductive Inference Models for Diagnostic Problem Solving</a>.</p>
  
  <p>And to add to what <a href="https://ai.stackexchange.com/users/5925/jahknows">JahKnows</a> says - I'd say that where something like deep-learning would be most likely to come into play, would be building the initial knowledgebase that is used in the diagnostic system.  That is, if you have lots of data relating symptoms to diseases, you could use deep learning to help define the weighting between specific diseases and specific symptoms.  And note that while abductive inference is considered a branch of logic, and PCT dates back to the "GOFAI" era, it is not a strictly symbolic approach.  The Reggia &amp; Peng book explains how to incorporate Bayesian reasoning into the abductive system.  Just FYI.</p>
  
  <p>Disclosure: I've recently been researching this area and am working on a modern implementation of PCT using the Semantic Web stack.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-21T17:15:57.880Z
Answers.Text: This question is a total duplicate.
Answers.UserDisplayName: quintumnia
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-21T17:18:55.627Z
Answers.Text: And?  It's here for better or for worse.  If SO has some means of merging questions, then maybe we can get it merged.  If not, it's hardly the end of the world.
Answers.UserDisplayName: mindcrime
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-21T17:35:12.840Z
Answers.Text: So you support duplicating of information. https://ai.stackexchange.com/questions/1705/selecting-the-right-technique-to-predict-disease-from-symptoms?rq=1 ..... Next time try to review questions at first.
Answers.UserDisplayName: quintumnia
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-21T17:37:10.693Z
Answers.Text: I don't *support* duplicating information, but it's hardly a big deal either.  And why are you bitching at me, this wasn't my question.  Talk to the OP if you have a problem with it.  And like I said, if there is some merge functionality, then maybe it can be merged.  I have no idea if SO has a feature like that or not.
Answers.UserDisplayName: mindcrime
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-21T17:40:31.307Z
Answers.Text: It's alright by me and you.lets keep our community clean just like nerdy world for us in the small wires of internet.However,i would kindly request you to be analytical before answering.simple.Am on to you;simply,you have been around and you know whats going on here.professionally.
Answers.UserDisplayName: quintumnia
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-21T17:43:03.340Z
Answers.Text: No, sorry, but I just don't care that much about your notion of "purity" and cleanliness.  Laissez-faire is the name of the game my man.
Answers.UserDisplayName: mindcrime
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-21T17:45:30.847Z
Answers.Text: Not man or human;i'm just an extraterrestrial being with much love for humans.However,lets vote to close this question? or else..new subjects will create disaster in future.
Answers.UserDisplayName: quintumnia
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-22T09:11:58.103Z
Answers.Text: @quintumnia i have already gone thorugh that question and beleive me its not duplicate.. becaure beleif network in not the solution for my problem because there is a nested option-question relation, please read the question carefully
Answers.UserDisplayName: Aman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-22T09:13:52.223Z
Answers.Text: @quintumnia and sorry but uh have written lots of things here may be you could have right the answer till now. if you have read the question carefully
Answers.UserDisplayName: Aman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-22T09:15:44.890Z
Answers.Text: @doe ,So scientifically,same concept but different solutions.Right?
Answers.UserDisplayName: quintumnia
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-22T09:17:19.937Z
Answers.Text: @quintumnia cant argue anymore lots of things to do...please read the question first
Answers.UserDisplayName: Aman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-22T09:21:33.510Z
Answers.Text: These are scientific arguments.and we scientists we have to come up with a conclusion.
Answers.UserDisplayName: quintumnia
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-21T16:49:21.593Z
Answers.LastActivityDate: 2017-07-21T17:02:08.540Z
Answers.LastEditDate: 2017-07-21T17:02:08.540Z
Answers.UserDisplayName: mindcrime
Answers.Body: <p>There is no defined rules for choosing a machine learning algorithm to learn some type of pattern. However, there are some guidelines to help you better select an algorithm which will yield a higher probability of success. </p>
  
  <p>Some important considerations are: </p>
  
  <ul>
  <li>Number of features: This is the number of questions that each patient had to answer.</li>
  <li>Number of instances: This is the number of patients that took your survey.</li>
  <li>Number of output classes: This is how specific you want your diagnosis of the disease. Is this a yes/no, or a 5-stage progression.</li>
  </ul>
  
  <p>The larger your feature space and the more output classes you have, the higher the complexity of your model. This is problematic because a more complex model will require more instances of data to learn the underlining patterns. You need to have a good balance between the number of examples you have in your dataset and the complexity of your model. </p>
  
  <p>If you have limited data then you will want to stay very far away from deep learning. In such cases, I prefer to use shallow methods such as <strong>SVM</strong>, <strong>Naive Bayes</strong> or <strong>Random Forests</strong>. These techniques have been shown to be able to capture non-linear relationships. SVM is particularly powerful, you can use the kernel trick! This will transform your feature space into a space that makes the differentiation between the classes easier to distinguish. Do not underestimate the power of this algorithm. </p>
  
  <p>If you have a very large dataset (i.e. 100,000 instances) then you will want to use deep learning. Recently, these techniques have been shown to outperform shallow machine learning algorithms in almost all categories where data is plentiful. You will want to start with a shallow <strong>neural network</strong> and then increase the complexity of your graph as you see fit. By adding additional nodes per layer, or by adding additional layers. Each node you add will increase the number of variables you need to tune, thus increasing the complexity of your model. If your data is expected to have some type of time dependency which often the case in medical data. Then you can use a <strong>long-short term memory</strong> neural network (LSTM). These are capable of capturing latent relationships. You can also try a <strong>stacked auto-encodder</strong>. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-21T13:50:58.983Z
Answers.LastActivityDate: 2017-07-21T13:50:58.983Z
Answers.UserDisplayName: JahKnows
Body: <p>I'm trying to come up with the right algorithm for a system in which the user enter symptoms and we starts triggering questions related to that symptoms and his answers will result a disease which is related to the answer which is given by the user</p>
  
  <p>Let's assume that the user entered the following input:</p>
  
  <p>Symptom - Deafness</p>
  
  <p>Q1. How long have you had a problem with deafness</p>
  
  <p><em>A)From few days B)From few weeks to months C)More than month D)Since Birth</em></p>
  
  <p>Q2. What was the onset of the deafness</p>
  
  <p><em>A) Sudden B) Gradual</em></p>
  
  <p>Now we have a knowledge base like if a user select option 1 from question 1 and option 2 form question 2 then we will give him some disease. But i need an algorithm which will give % of success in backend so that i can throw the results of disease for example if a user select option 2 from question1 and option 1 from question 2, then when we compare from our knowledge base there will be one set over there which has  option 1 from question 1 and option 2 from question 2 then its a "SOME" disease.. now if we compare from our knowledgebase and we found even 50% of the choices is resulting this disease we will throw that disease name.</p>
  
  <p>NOW i am confused what algo should be use for this approach for ai.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-21T17:14:48.403Z
Comments.Text: Possible duplicate of this https://ai.stackexchange.com/questions/1705/selecting-the-right-technique-to-predict-disease-from-symptoms?rq=1 ....Try to do research in this community carefully
Comments.UserDisplayName: quintumnia
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-21T17:17:55.667Z
Comments.Text: i vote to close it or else...every new subject will do the same
Comments.UserDisplayName: quintumnia
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-21T17:42:13.863Z
Comments.Text: If SO has some facility to merge questions, then I would support merging them. If not, I vote to leave this alone.  The sidebar surfaces the question you are referencing  as "related" so anybody looking at that has plenty of opportunity to explore the other one as well.
Comments.UserDisplayName: mindcrime
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-21T17:51:24.500Z
Comments.Text: @mindcrime ,lets be professional here.Information Duplication will create confusion to future beings or researchers.
Comments.UserDisplayName: quintumnia
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-21T17:57:46.913Z
Comments.Text: Like I've said multiple times now... I support merging these if it's possible.  But if it's not, it's not some big deal.  The amount of "confusion" that would be created is minuscule at best.  Yes, it's good to avoid duplication, but we also have to be pragmatic.  It's going to happen sometimes.
Comments.UserDisplayName: mindcrime
Tags: <machine-learning><algorithm><prediction>
Title: Selecting the right algorithm to predict disease from questions
UserDisplayName: Aman
ThreadText: # Selecting the right algorithm to predict disease from questions
  
  (Asked by: username_0 on 2017-07-21)
  
  I'm trying to come up with the right algorithm for a system in which the user enter symptoms and we starts triggering questions related to that symptoms and his answers will result a disease which is related to the answer which is given by the user
  
  Let's assume that the user entered the following input:
  
  Symptom - Deafness
  
  Q1. How long have you had a problem with deafness
  
  *A)From few days B)From few weeks to months C)More than month D)Since Birth*
  
  Q2. What was the onset of the deafness
  
  *A) Sudden B) Gradual*
  
  Now we have a knowledge base like if a user select option 1 from question 1 and option 2 form question 2 then we will give him some disease. But i need an algorithm which will give % of success in backend so that i can throw the results of disease for example if a user select option 2 from question1 and option 1 from question 2, then when we compare from our knowledge base there will be one set over there which has option 1 from question 1 and option 2 from question 2 then its a "SOME" disease.. now if we compare from our knowledgebase and we found even 50% of the choices is resulting this disease we will throw that disease name.
  
  NOW i am confused what algo should be use for this approach for ai.
  
  **Tags:** machine-learning, algorithm, prediction
  
  > **Comments:**
  > **username_1**: Possible duplicate of this https://ai.stackexchange.com/questions/1705/selecting-the-right-technique-to-predict-disease-from-symptoms?rq=1 ....Try to do research in this community carefully  
  > **username_1**: i vote to close it or else...every new subject will do the same  
  > **username_2**: If SO has some facility to merge questions, then I would support merging them. If not, I vote to leave this alone.  The sidebar surfaces the question you are referencing  as "related" so anybody looking at that has plenty of opportunity to explore the other one as well.  
  > **username_1**: @username_2 ,lets be professional here.Information Duplication will create confusion to future beings or researchers.  
  > **username_2**: Like I've said multiple times now... I support merging these if it's possible.  But if it's not, it's not some big deal.  The amount of "confusion" that would be created is minuscule at best.  Yes, it's good to avoid duplication, but we also have to be pragmatic.  It's going to happen sometimes.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2017-07-21. Score: 3 | Accepted answer
  
  There is no defined rules for choosing a machine learning algorithm to learn some type of pattern. However, there are some guidelines to help you better select an algorithm which will yield a higher probability of success.
  
  Some important considerations are:
  
  * Number of features: This is the number of questions that each patient had to answer.
  * Number of instances: This is the number of patients that took your survey.
  * Number of output classes: This is how specific you want your diagnosis of the disease. Is this a yes/no, or a 5-stage progression.
  
  The larger your feature space and the more output classes you have, the higher the complexity of your model. This is problematic because a more complex model will require more instances of data to learn the underlining patterns. You need to have a good balance between the number of examples you have in your dataset and the complexity of your model.
  
  If you have limited data then you will want to stay very far away from deep learning. In such cases, I prefer to use shallow methods such as **SVM**, **Naive Bayes** or **Random Forests**. These techniques have been shown to be able to capture non-linear relationships. SVM is particularly powerful, you can use the kernel trick! This will transform your feature space into a space that makes the differentiation between the classes easier to distinguish. Do not underestimate the power of this algorithm.
  
  If you have a very large dataset (i.e. 100,000 instances) then you will want to use deep learning. Recently, these techniques have been shown to outperform shallow machine learning algorithms in almost all categories where data is plentiful. You will want to start with a shallow **neural network** and then increase the complexity of your graph as you see fit. By adding additional nodes per layer, or by adding additional layers. Each node you add will increase the number of variables you need to tune, thus increasing the complexity of your model. If your data is expected to have some type of time dependency which often the case in medical data. Then you can use a **long-short term memory** neural network (LSTM). These are capable of capturing latent relationships. You can also try a **stacked auto-encodder**.
  
  
  ---
  
  ### Answer by username_2 on 2017-07-21. Score: 0
  
  Medical diagnosis often employs [abductive inference](https://en.wikipedia.org/wiki/Abductive_reasoning) (also known as "inference to the best explanation"), and automated approaches to abductive reasoning have been applied to medical diagnosis. More concretely, a mechanism known as [Parsimonious Covering Theory](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2244953/) has been extensively researched as an approach to automated abductive reasoning in medical scenarios (among others). You might consider giving that a look.
  
  FWIW, one of the main researchers in the field is [Professor James Reggia](https://www.cs.umd.edu/~reggia/) from UMD. He and [Yun Peng](https://www.csee.umbc.edu/~ypeng) wrote a very accessible book on the subject - [Abductive Inference Models for Diagnostic Problem Solving](http://rads.stackoverflow.com/amzn/click/B000QCQWL8).
  
  And to add to what [username_3](https://ai.stackexchange.com/users/5925/username_3) says - I'd say that where something like deep-learning would be most likely to come into play, would be building the initial knowledgebase that is used in the diagnostic system. That is, if you have lots of data relating symptoms to diseases, you could use deep learning to help define the weighting between specific diseases and specific symptoms. And note that while abductive inference is considered a branch of logic, and PCT dates back to the "GOFAI" era, it is not a strictly symbolic approach. The Reggia & Peng book explains how to incorporate Bayesian reasoning into the abductive system. Just FYI.
  
  Disclosure: I've recently been researching this area and am working on a modern implementation of PCT using the Semantic Web stack.
  
  > **Comments:**
  > **username_1**: This question is a total duplicate.  
  > **username_2**: And?  It's here for better or for worse.  If SO has some means of merging questions, then maybe we can get it merged.  If not, it's hardly the end of the world.  
  > **username_1**: So you support duplicating of information. https://ai.stackexchange.com/questions/1705/selecting-the-right-technique-to-predict-disease-from-symptoms?rq=1 ..... Next time try to review questions at first.  
  > **username_2**: I don't *support* duplicating information, but it's hardly a big deal either.  And why are you bitching at me, this wasn't my question.  Talk to the OP if you have a problem with it.  And like I said, if there is some merge functionality, then maybe it can be merged.  I have no idea if SO has a feature like that or not.  
  > **username_1**: It's alright by me and you.lets keep our community clean just like nerdy world for us in the small wires of internet.However,i would kindly request you to be analytical before answering.simple.Am on to you;simply,you have been around and you know whats going on here.professionally.  
  > **username_2**: No, sorry, but I just don't care that much about your notion of "purity" and cleanliness.  Laissez-faire is the name of the game my man.  
  > **username_1**: Not man or human;i'm just an extraterrestrial being with much love for humans.However,lets vote to close this question? or else..new subjects will create disaster in future.  
  > **username_0**: @username_1 i have already gone thorugh that question and beleive me its not duplicate.. becaure beleif network in not the solution for my problem because there is a nested option-question relation, please read the question carefully  
  > **username_0**: @username_1 and sorry but uh have written lots of things here may be you could have right the answer till now. if you have read the question carefully  
  > **username_1**: @doe ,So scientifically,same concept but different solutions.Right?  
  > **username_0**: @username_1 cant argue anymore lots of things to do...please read the question first  
  > **username_1**: These are scientific arguments.and we scientists we have to come up with a conclusion.  
  
  ---
  
  