<p>This does not look a great confusion matrix, but it is a very, very cool approach. The cool thing about machine learning is the ability to examine lots of models within confusion matrices.</p>

<hr>

<p>To answer your question, you want a heat map of the regression weights to establish who is who, i.e. which patient is false positive etc... This is the only way I'm aware of to analyse a neural network. This looks like R, I only know Scikit learn.</p>

CC BY-SA 4.0
2019-02-18T20:04:50.787Z
Sorry, why you are mentioning my approach is a very, very cool whereas I better change the model? Which aspect is cool then?
Zizogolu
CC BY-SA 4.0
2019-02-18T23:32:25.733Z
I have changed my answer to be more diplomatic, apologies. Neural networks are very cool per se largely because of Google - albeit they are champions of reinforced learning. The problem with neural nets is the difficulty in accurately understanding what each component (patient in this case) has contributed to the overall result and why. Other approaches are much clearer on this. Ultimately they are just one approach amongst many machine learning approaches. I like the whole area - except for having to learn Python.
M__
CC BY-SA 4.0
2019-02-17T22:47:21.620Z
2019-02-18T23:33:42.127Z
2019-02-18T23:33:42.127Z
M__
<p>I have inferred a confusion matrix of training and test set by neural network. I want to know which members are in the confusion matrix.</p>

<pre><code>&gt; table(test<span class="math-container">$TRG,predicted.nn.values$</span>net.result)

    0 1
  0 5 4
  1 5 3
&gt; 

&gt; head(train[,1:4])
  TRG      ALB     AQP9   CALML5
1   1 5.865827 8.190945 6.705303
2   1 6.998435 8.424261 8.505591
3   1 7.424512 8.716471 7.249556
4   1 7.442049 8.325263 8.809286
6   1 5.893411 8.199990 6.677618
7   1 7.288030 9.143510 7.088598
&gt; 

&gt; head(test[,1:4])
   TRG      ALB     AQP9    CALML5
5    1 6.369307 7.954310  6.920290
8    1 6.181902 8.651442  7.225389
10   1 6.119359 9.345270  6.829623
13   1 7.775533 9.016272  7.976813
14   1 5.913656 9.484457 10.609013
18   1 6.603138 7.908560  8.827173
&gt; 
</code></pre>

<p>How can I know which patients are false positive or true negative? For example I have 5 patients predicted correctly, how can I know the name of these patients?</p>

CC BY-SA 4.0
2019-02-19T08:23:39.460Z
Could you please clarify what is each object and how was it obtained? Without knowing the details of the object we can only guess. What do you mean by "which members are in the confusion matrix"?
llrs
<r><machine-learning>
Finding the members in a confusion matrix
# Finding the members in a confusion matrix

(Asked by: username_0 on 2019-02-17)

I have inferred a confusion matrix of training and test set by neural network. I want to know which members are in the confusion matrix.
> table(test$TRG,predicted.nn.values$net.result)

    0 1
  0 5 4
  1 5 3
> 

> head(train[,1:4])
  TRG      ALB     AQP9   CALML5
1   1 5.865827 8.190945 6.705303
2   1 6.998435 8.424261 8.505591
3   1 7.424512 8.716471 7.249556
4   1 7.442049 8.325263 8.809286
6   1 5.893411 8.199990 6.677618
7   1 7.288030 9.143510 7.088598
> 

> head(test[,1:4])
   TRG      ALB     AQP9    CALML5
5    1 6.369307 7.954310  6.920290
8    1 6.181902 8.651442  7.225389
10   1 6.119359 9.345270  6.829623
13   1 7.775533 9.016272  7.976813
14   1 5.913656 9.484457 10.609013
18   1 6.603138 7.908560  8.827173
> 

How can I know which patients are false positive or true negative? For example I have 5 patients predicted correctly, how can I know the name of these patients?

**Tags:** r, machine-learning
> **Comments:**
> **username_1**: Could you please clarify what is each object and how was it obtained? Without knowing the details of the object we can only guess. What do you mean by "which members are in the confusion matrix"?  

---

## 1 answers

### Answer by username_2 on 2019-02-17. Score: 1

This does not look a great confusion matrix, but it is a very, very cool approach. The cool thing about machine learning is the ability to examine lots of models within confusion matrices.

---

To answer your question, you want a heat map of the regression weights to establish who is who, i.e. which patient is false positive etc... This is the only way I'm aware of to analyse a neural network. This looks like R, I only know Scikit learn.

> **Comments:**
> **username_0**: Sorry, why you are mentioning my approach is a very, very cool whereas I better change the model? Which aspect is cool then?  
> **username_2**: I have changed my answer to be more diplomatic, apologies. Neural networks are very cool per se largely because of Google - albeit they are champions of reinforced learning. The problem with neural nets is the difficulty in accurately understanding what each component (patient in this case) has contributed to the overall result and why. Other approaches are much clearer on this. Ultimately they are just one approach amongst many machine learning approaches. I like the whole area - except for having to learn Python.  

---

