+ 1

Welcome to the matrix

Anyone help me with this code. It's passing all test cases except last one. https://code.sololearn.com/cKw6xLFhLpj6/?ref=app

28th Feb 2021, 3:32 AM
Akhil Techie
Akhil Techie - avatar
6 Respuestas
+ 7
Akhil Techie Your program is correct. You just need to do some changes...I hope you will understand where was the problem. https://code.sololearn.com/cA0a10A6A9A1/?ref=app
28th Feb 2021, 4:43 AM
A͢J
A͢J - avatar
+ 6
ANS : tp, fp, fn, tn = [int(x) for x in input().split()] ac = (tp + tn) / (tp+fp+fn+tn) pr = tp / (tp + fp) re = tp / (tp + fn) f1 = (2 * pr * re) / (pr + re) output = [ac, pr, re, f1] for i in output: print(round(i, 4))
24th Jul 2022, 10:55 PM
Reza Zeraat Kar
Reza Zeraat Kar - avatar
+ 1
I Am AJ ! Got it thank you ☺️
28th Feb 2021, 5:20 AM
Akhil Techie
Akhil Techie - avatar
0
first of all u try. tp, fp, fn, tn = [int(x) for x in input().split()] ac = (tp + tn) / (tp+fp+fn+tn) pr = tp / (tp + fp) re = tp / (tp + fn) f1 = (2 * pr * re) / (pr + re) output = [ac, pr, re, f1] for i in output: print(round(i, 4))
15th Sep 2022, 9:55 AM
Kanisak Shakya
Kanisak Shakya - avatar
0
IT WORKS 100% tp, fp, fn, tn = [int(x) for x in input().split()] precision = tp/(tp+fp) recall = tp/(tp+fn) f1 = 2*((precision*recall)/(precision+recall)) print(round((tp+tn)/(tp+fn+tn+fp),4)) print(round((precision),4)) print(round((recall),4)) print(round((f1),4))
1st Nov 2022, 10:08 PM
Adanya William Eyram Kofi
- 1
Thank you for your code, but I wanted to know why my code is not working with the format specifiers 😁😁
28th Feb 2021, 4:24 AM
Akhil Techie
Akhil Techie - avatar