Solved – How to get confusion matrix with 100% precision or 100% recall in Weka

Here is the original confusion matrix:

    | Yes |  No  |               -----------------        The top right corner:   False Negative  Yes|1000 | 200  |        The top left corner:    True Positive  -----------------        The bottom right corner:True Negative   No|200  | 500  |        The bottom left corner: False Positive 

I expect to get these :

  1. Basically, I am looking for an option or command in the classifier that can enforce WEKA not misclassifying the 200 TP instances to the FN section. In other words, the number of TP instances will be 1000 + 200 = 1200, and number of FN instances will be 0 or 100% precision.

       |  Yes  |  No  |      -------------------      Yes| 1200  |  0   |      -------------------      No | 200   | 500  |      
  2. Same idea for the second part, all the FP instances are moved to TN section or 100% recall.

       |  Yes  |  No  |     -------------------     Yes| 1000  | 200  | ------------------- No |   0   | 500  | 

Is there any way to implement this idea in WEKA?

Have you tried playing with the Cost Matrix (Cost-sensitive evaluation)? It can not guarantee a priori your outcome, but can force Weka to be more sensitive to a particular type or error.

Similar Posts:

Rate this post

Leave a Comment