<p>I'll give an answer for generic learning algorithms -- nothing specific to neural nets. For answering basic conceptual questions of what can or cannot be learned by an algorithm, try to put yourself in the algorithm's shoes. If I told you that a certain treatment worked for patients A and B but failed for patient C (and, crucially, that is <em>all</em> the data I gave you), could you possibly predict whether the treatment will work for patient D? Of course not, and neither is it reasonable to expect such magic from a machine.</p>

<p>If I gave you many more details about these patients (say, their ages, maybe some health history, etc) -- what we call <em>features</em> in the ML lingo -- your chances of learning to predict whether a treatment will succeed will be much better. Needless to say, the usual caveat applies: The features must be <em>relevant</em> to your prediction problem. For example, if the features I gave you were actually the movie ratings these patients gave on Netflix, that would probably be (a lot of) useless information.</p>

<p>So that's pretty much your answer. Present the data to the learning algorithm with sufficiently many useful features to make prediction possible (but not too many, because then you'll need huge sample sizes to avoid overfitting). I strongly urge you to take an intro stats/ML class before drawing medical conclusions from running learning algorithms on data. It's rather common for folks lacking a basic statistical foundation to make hair-raising mistakes.</p>

CC BY-SA 3.0
2017-04-15T17:40:11.013Z
Indeed, I do have many more features than Blood 1-3 only. In theory, an algorithm should therefore be capable to recommend a treatment for a new patient X, who is very similar to another patient Y in the training data.
However, if the training data showed, that patient Y did not ameliorate his values using Treatment 1, the algorithm should advise against this treatment (= which I call "learning from bad examples"). I believe, this is no "magic". Please correct me if I'm wrong. If this is possible, what is the practical implementation of the respective target vector in the NN?
G. Werner
CC BY-SA 3.0
2017-04-15T19:45:03.400Z
How many patients (i.e., data points) do you have? How many features?
Aryeh
CC BY-SA 3.0
2017-04-16T08:23:15.577Z
Around 22 features for 1900 patient records and 9 therapies.
G. Werner
CC BY-SA 3.0
2017-04-16T08:38:53.223Z
OK, the 22/1900 are reasonable numbers. I would try a binary classification problem first: pick 1 therapy and try to predict whether it will succeed for a patient or not, based on the features. Try using a more "classic" classification algorithm such as SVM or decision trees.
Aryeh
CC BY-SA 3.0
2017-04-19T13:17:39.927Z
So you mean I should create one SVM for each therapy, combine them in a decision tree and see which therapy fits best for a new patient, right? Good workaround!
Would you thereby say, an ANN cannot solve this task?
G. Werner
CC BY-SA 3.0
2017-04-19T13:20:42.460Z
Slow down :) I'm certainly not making any claims about ANN (in general, it's a richer function class than what SVM uses, so whatever SVM can "solve", so can ANN). Also, there are some statistical problems with just choosing the "best" therapy. My motto is: Solve the simplest nontrivial problem first. In your case, that would be picking 1 therapy (a priori -- BEFORE running any experiments) and seeing how well you can predict its success using a well-understood, classic algorithm such as SVM or decision trees.
Aryeh
CC BY-SA 3.0
2017-04-13T22:28:34.373Z
2017-04-13T22:28:34.373Z
Aryeh
<p>I want to recommend one of three possible treatments for a patient, based on his blood values A, B and C. </p>

<p>To solve this task, I have constructed a supervised feed-forward NN with back-propagation (input values = blood values | output values = treatments).</p>

<p>My training data-set contains medical records for past treatments. A blood value between [0,1] is good, above is bad. It looks like this:</p>

<p><a href="https://i.sstatic.net/Y1Jfy.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Y1Jfy.png" alt="patient records"></a></p>

<p>As you can see, some patients' blood values improved after the treatment (patient 001). Others partially improved (patient 002). Equally, there are some patients, whose blood values worsened (patient 003).</p>

<p>In training data pre-processing, one would delete patients 002 and 003, since patient 001 is the only "good" example. </p>

<p><strong>Is there any possibility to teach my network to not follow the "bad" example of patient 003?</strong> Or is this network topology not capable of doing so at all? </p>

CC BY-SA 3.0
2017-04-16T08:30:02.380Z
This might be more appropriate for Cross Validated https://stats.stackexchange.com/
András Salamon
<machine-learning>
Supervised learning from "bad" examples - ANN
G. Werner
# Supervised learning from "bad" examples - ANN

(Asked by: username_0 on 2017-04-13)

I want to recommend one of three possible treatments for a patient, based on his blood values A, B and C.

To solve this task, I have constructed a supervised feed-forward NN with back-propagation (input values = blood values | output values = treatments).

My training data-set contains medical records for past treatments. A blood value between [0,1] is good, above is bad. It looks like this:

[![patient records](https://i.sstatic.net/Y1Jfy.png)](https://i.sstatic.net/Y1Jfy.png)

As you can see, some patients' blood values improved after the treatment (patient 001). Others partially improved (patient 002). Equally, there are some patients, whose blood values worsened (patient 003).

In training data pre-processing, one would delete patients 002 and 003, since patient 001 is the only "good" example.

**Is there any possibility to teach my network to not follow the "bad" example of patient 003?** Or is this network topology not capable of doing so at all?

**Tags:** machine-learning
> **Comments:**
> **username_1**: This might be more appropriate for Cross Validated https://stats.stackexchange.com/  

---

## 1 answers

### Answer by username_2 on 2017-04-13. Score: 3 | Accepted answer

I'll give an answer for generic learning algorithms -- nothing specific to neural nets. For answering basic conceptual questions of what can or cannot be learned by an algorithm, try to put yourself in the algorithm's shoes. If I told you that a certain treatment worked for patients A and B but failed for patient C (and, crucially, that is *all* the data I gave you), could you possibly predict whether the treatment will work for patient D? Of course not, and neither is it reasonable to expect such magic from a machine.

If I gave you many more details about these patients (say, their ages, maybe some health history, etc) -- what we call *features* in the ML lingo -- your chances of learning to predict whether a treatment will succeed will be much better. Needless to say, the usual caveat applies: The features must be *relevant* to your prediction problem. For example, if the features I gave you were actually the movie ratings these patients gave on Netflix, that would probably be (a lot of) useless information.

So that's pretty much your answer. Present the data to the learning algorithm with sufficiently many useful features to make prediction possible (but not too many, because then you'll need huge sample sizes to avoid overfitting). I strongly urge you to take an intro stats/ML class before drawing medical conclusions from running learning algorithms on data. It's rather common for folks lacking a basic statistical foundation to make hair-raising mistakes.

> **Comments:**
> **username_0**: Indeed, I do have many more features than Blood 1-3 only. In theory, an algorithm should therefore be capable to recommend a treatment for a new patient X, who is very similar to another patient Y in the training data. However, if the training data showed, that patient Y did not ameliorate his values using Treatment 1, the algorithm should advise against this treatment (= which I call "learning from bad examples"). I believe, this is no "magic". Please correct me if I'm wrong. If this is possible, what is the practical implementation of the respective target vector in the NN?  
> **username_2**: How many patients (i.e., data points) do you have? How many features?  
> **username_0**: Around 22 features for 1900 patient records and 9 therapies.  
> **username_2**: OK, the 22/1900 are reasonable numbers. I would try a binary classification problem first: pick 1 therapy and try to predict whether it will succeed for a patient or not, based on the features. Try using a more "classic" classification algorithm such as SVM or decision trees.  
> **username_0**: So you mean I should create one SVM for each therapy, combine them in a decision tree and see which therapy fits best for a new patient, right? Good workaround! Would you thereby say, an ANN cannot solve this task?  
> **username_2**: Slow down :) I'm certainly not making any claims about ANN (in general, it's a richer function class than what SVM uses, so whatever SVM can "solve", so can ANN). Also, there are some statistical problems with just choosing the "best" therapy. My motto is: Solve the simplest nontrivial problem first. In your case, that would be picking 1 therapy (a priori -- BEFORE running any experiments) and seeing how well you can predict its success using a well-understood, classic algorithm such as SVM or decision trees.  

---

