[Tutor] Medical Decision-Making Question

Jim Richardson weaselkeeper at gmail.com
Tue Jun 14 03:25:33 CEST 2011


On Mon, Jun 13, 2011 at 3:35 PM, Fred G <bayespokerguy at gmail.com> wrote:
> Thanks guys for all the feedback.
> re Jim's comments: I completely agree that the difference b/t "slight" fever
> and "returning" fever, etc will pose some problems.  My hunch is that
> initially I'll just do something like make "fever" be the only one for now
> w/ the obvious caveat that a few more diseases would not be eliminated than
> actually should be.  Building on this, another challenging problem will be
> how to code the fact that when a symptom occurs early it usually means
> something else than if it returns later in the course of an illness.  I'm
> not 100% sure how I'll handle this, but I think the first priority is
> getting access to a dataset and getting the bot up and running before I
> focus on this.
> re Steve's comments: hmm, sounds like I really should take an AI class.
>  This problem is just really exciting and driving me, and I'm glad you
> pointed out that this will probably take a lot more time than I had
> predicted.  I'm pretty motivated personally to solve it.  I had a few more
> questions about your code:
> a) Why did you choose not to use a dictionary to store the diseases (keys)
> and their possible values (symptoms)?  That seemed the most intuitive to me,
> like, what I want to do is have it such that we enter in a few symptoms and
> then all the keys without those symptoms are automatically eliminated.  I've
> been off and on teaching myself python for the last 6 months and have
> experience in Java.  I mean, I think I want a structure like this:


If you are going to use dicts, I'd suggest you flip it around, have
the symptom be the key, and the list of diseases related to a given
symptom, be the value.

But that sounds more like a map:reduce problem or an sql query problem
than a dict one.   I haven't used it in over 20 years, and I was no
expert then, but this sounds like a prolog problem :) To maintain the
pythonical nature of the list, https://bitbucket.org/cfbolz/pyrolog/
is something I found. Looks interesting.




> 1) Main class
> -this class calls the diagnose_disease class based on the set of entered
> symptoms and demographic information (ie age, location, season (winter,
> spring, fall, etc), patient history)
> 2) Diagnose_disease class
> -this is the heart of the project.  Based on the entered symptoms, it keeps
> narrowing down the list of possible diseases.  Ideally it would ask
> follow-up questions of the user to even further narrow down the list of
> possible diseases, but that's going to have to wait until I get the rest
> working.
> 3) Dictionary Class
> -this class contains a *dictionary??* of all possible diseases and their
> associated symptoms.  Assuming in a standardized form for now (such that
> "slight_fever" and "returning_fever" are simply coded as "fever" for now,
> etc).
> does this seem like the best way to go about it?
> re: James.  I completely agree that my first step should be getting access
> to a dataset.  I need to know the format, etc of it before I really can
> progress on this.
>
>



-- 
http://neon-buddha.net


More information about the Tutor mailing list