
How a mathematician constructed a decision tree to solve a medical problem - tomaskazemekas
http://fastml.com/how-a-russian-mathematician-constructed-a-decision-tree-by-hand-to-solve-a-medical-problem/
======
qohen
_Even if I don’t know much about the medical aspects of the problem, I could
try to learn his methodology following his decision-making process, and then I
could use this knowledge to come up with a set of rules.”_

As the song says, "everything old is new again":

[https://en.wikipedia.org/wiki/Knowledge_engineering](https://en.wikipedia.org/wiki/Knowledge_engineering)

[https://en.wikipedia.org/wiki/Rule_based_system](https://en.wikipedia.org/wiki/Rule_based_system)

[https://en.wikipedia.org/wiki/Expert_system](https://en.wikipedia.org/wiki/Expert_system)

~~~
pling
I wrote one of them for our support team to stop them asking me questions
every two minutes (decision tree engine). Works wonders.

I'll eventually automate myself out of the office and then go sit on a beach
somewhere.

------
GraffitiTim
This reminds me of those 20 Questions apps. Have you tried a good one lately?
"Akinator" on iOS has an incredible ability to predict the person or character
you're thinking of. It successfully guessed "one of the twins from The
Shining" and "Calvin's dad from Calvin & Hobbes" when I played.

I can't imagine there are more possible diagnoses than there are fictional
characters and famous people.

~~~
Huggernaut
Akinator also available online here"
[http://en.akinator.com](http://en.akinator.com)

~~~
eru
I tried to make it guess Sauron, but to no avail.

~~~
sirsar
I'm not really a LoTR fan, but he got it first try on my play.

The game report is interesting:
[http://imgur.com/5YRk8jv](http://imgur.com/5YRk8jv)

~~~
eru
I said `yes' to servant, since Sauron is a servant to Morgoth (or so). I guess
the program had another idea.

------
zaroth
Interesting, this seems like a great example of the kind of diagnostic patent
or 'natural law' patent that the Supreme Court struck down in 2012 in the
Prometheus Laboratories case.

------
jesuslop
Also the book from Frenkel where this comes from (Love and Math: The heart of
hidden reality) is completely awesome, a motivator for doing maths
proffesionally, and with the strange ability to distill without distort modern
math work (of his mainly) and transmit their importance outside the original
circles. Just can say +1 to him!

------
anko
I find this article insanely interesting. Is there software to help doctors
create this decision tree these days?

Shame about the patent - why would someone do that?

~~~
daniel-levin
Of course. They're called expert systems [1]. Yesterday on HN someone posted a
link to a book [2] on probabilistic models of cognition which includes a
section [3] on medical diagnosis.

[1]
[http://en.wikipedia.org/wiki/Expert_system](http://en.wikipedia.org/wiki/Expert_system)
[2] [https://probmods.org/](https://probmods.org/) [3]
[https://probmods.org/conditioning.html#example-causal-
infere...](https://probmods.org/conditioning.html#example-causal-inference-in-
medical-diagnosis)

~~~
mr_luc
For coders - Peter Norvig's PAIP (which might be The Best Programming Book,
but no room to get into that here) talks about these and leads you through
building something like EMYCIN, the base of a functioning expert system
without anything particularly domain-specific.

But Norvig also put them in context, and left me with the impression that
Expert Systems were proven inferior to Bayesian approaches for a lot of the
problems they had been developed for.

I can well imagine, though, that there _are_ problems where expert systems are
a good fit.

As an interaction model and as a way of guiding control flow, as a weird and
different way of handling user interaction and building extensible
applications, I think the EMYCIN example from PAIP is pretty cool. I've
wondered how possible it could be to use something like EMYCIN to write
webapps ...

~~~
lucidrains
We should get in touch, I've started translating Mycin into CoffeeScript, with
the hopes of creating a crowdsourced medical expert system within the summer.

~~~
daniel-levin
This sounds very cool. If you're planning on open sourcing any and all of this
I'd like to contribute

~~~
lucidrains
Yes, it will be open sourced! I want to show engineers just how inanely dumb
some of the algorithms in medicine are, and how (I believe) we can start
creating publicly usable algorithms to pipe knowledge to the consumers once
they get access to a bunch of data from consumer medical devices. Lofty goals,
but I will attempt to execute on the idea!

~~~
lucidrains
Thanks Rob! Would love for you to participate and help me iterate once I
release a prototype in a week or two. I have a colleague at Weill Cornell who
may help test drive the system as well. Got your email in my notebook!

------
scept1c
"One of the stories is about how during his studies in the 80s he built a
decision tree to help with kidney transplants."

And here we are almost thirty years later, and doctors in the US are still
getting paid $250k or more to do stuff software could do, were it allowed,
better, faster, and much cheaper.

My prediction is medicine will be one of the last fields to benefit from
automation, simply because its greedy practitioners have a monopoly and won't
give it up without a terrible fight. Sure, you'll increasingly see them rely
on expert systems, but you won't be allowed to cutout the middlemen and go
straight to Dr. Watson itself. They'll still be extracting their pound of
flesh from us for many decades to come.

~~~
mtdewcmu
I will not be happy the day I go to the E.R. with some emergency and I have to
talk to a machine...

~~~
Scoundreller
So if we had evidence that a machine was more effective or made better
decisions (or had better all-cause mortality evidence) than a human clinician,
you would choose the human clinician in all cases?

How is this any different than comparing Drug A to Drug B? You should choose
the one that's more effective (and/or cheaper), why should emotion or the
human-touch get into it?

Having said that, if you're paying the bill yourself, go nuts, but I'm in an
environment where the public foots most of these bills, and therefore has some
say in my opinion.

~~~
mtdewcmu
The human clinician would (hopefully) be operating the machine.

------
Mz
I am wondering if decision trees ever get used in game code. A quick search
isn't exactly turning up an answer, though I did find a piece on decision
trees on AI Horizon:
[http://www.aihorizon.com/essays/generalai/decision_trees.htm](http://www.aihorizon.com/essays/generalai/decision_trees.htm)
And there is also this:
[http://en.wikipedia.org/wiki/Game_tree](http://en.wikipedia.org/wiki/Game_tree)
But I am thinking more like a game like SimCity, for example. And I am not
really finding an answer.

~~~
mendicantB
They do [1], but not as often as you expect. Most games don't actually use AI,
as the goal is to make in game characters appear intelligent, rather than
actually being so.

[1] [http://www.sauropodstudio.com/dev-diary-number-fifteen-ai-
ba...](http://www.sauropodstudio.com/dev-diary-number-fifteen-ai-basics/)

~~~
Mz
Thx!

------
microraptor
Rather than decide which questions are the most important themselves, I wonder
what results they could have gotten from running simulations with various
weights on various parameters and question responses to try to come up with a
correct diagnosis. At the very least the doctor's approach turns out to be
best and they are already using that. Maybe the Monte Carlo type decision tree
would be better though.

------
lucidrains
There is really nothing too intriguing about 'clinical reasoning'. Diagnosis
is simply a collection of crude algorithms, some decision tree based, some are
rule based, other's a crude criteria or point based system (poor mans
Bayesian). I'm in the process of building a web app on this theme, so get in
contact if you are interested!

~~~
alsocasey
The real problem in the field is that diagnosis is often a relatively poor
gold standard to learn against in many more complex (or poorly understood)
diseases.

------
yawaramin
Decision trees are also used in pricing stock options:
[http://www.investopedia.com/terms/l/lattice-
model.asp](http://www.investopedia.com/terms/l/lattice-model.asp)

Effectively, a lattice model is a decision tree about the different factors
affecting an option's value, and thus the resulting value.

------
MisterNegative
Why don't they link to the paper? This article is really crappy and doesn't
explain what they did at all. For example, why diddn't they mention
probabilist networks, which dominates this field. And I doubt that 240 data
points is enough to write a paper.

~~~
gwern
> Why don't they link to the paper?

I see nothing in
[http://scholar.google.com/scholar?q=frenkel+Arutyunyan+kidne...](http://scholar.google.com/scholar?q=frenkel+Arutyunyan+kidney+transplant+decision+tree&btnG=&hl=en&as_sdt=0%2C9)
and given the context, it was likely buried in an obscure Russian journal & so
of no value to English readers anyway.

> This article is really crappy and doesn't explain what they did at all.

Seems like a good explanation to me.

> For example, why diddn't they mention probabilist networks, which dominates
> this field.

Because those weren't used much back then.

> And I doubt that 240 data points is enough to write a paper.

Sure it is. Why wouldn't n=240 work?

~~~
Chronic28
Given the amount of data available, it is not unreasonable to expect n>1000

~~~
gwern
They obviously did not think that reasonable, their results seem to be fine,
and I still don't see what the problem is with n=240.

