Question

Given the following prediction Sample ID Predicted Value Ground Truth 1 0.9 1 2 0.3 1...

Given the following prediction Sample ID Predicted Value Ground Truth 1 0.9 1 2 0.3 1 3 0.7 1 4 0.8 -1 5 0.4 -1 6 0.2 -1 (a) (18 Pts) Using 0.5 as the cutoff value, namely, the sample is predicted as 1 if predicted value >=0.5, otherwise -1. Please compute true positive rate (tpr, also called recall/sensitivity), false positive rate (fpr), true negative rate (tnr), false negative rate (fnr), accuracy and precision, respectively.

Homework Answers

Answer #1

From what I understand, the data looks like this:

Sample ID Predicted Value Ground Truth
1 0.9 1
2 0.3 1
3 0.7 1
4 0.8 -1
5 0.4 -1
6 0.2 -1

Thus, the predicted values are 1, -1, 1, 1, -1, -1.

Thus, the confusion matrix will look as so:

Predicted +1 Predicted -1
Actual +1 2 1
Actual -1 1 2

Thus,

true positive rate= tpr= 2/(2+1)

= 2/3= 0.67 or 67%

true negative rate= fpr= 2/(2+1)

= 2/3= 0.67 or 67%

false positive rate= 1- true negative rate

= 1-0.67= 0.33 or 33%

false negative rate= 1- true positive rate

= 1-0.67= 0.33 or 33%

accuracy= 4/6

= 2/3= 0.67 or 67%

precision= 2/3

= 0.67 or 67%

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT