0
$\begingroup$

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?

$\endgroup$
1
  • $\begingroup$ 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"? $\endgroup$
    – llrs
    Feb 19, 2019 at 8:23

1 Answer 1

1
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ Sorry, why you are mentioning my approach is a very, very cool whereas I better change the model? Which aspect is cool then? $\endgroup$
    – Exhausted
    Feb 18, 2019 at 20:04
  • $\begingroup$ 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. $\endgroup$
    – M__
    Feb 18, 2019 at 23:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.