(Solved) : Pap Pls Help Programing Problem C Better Comment Coding Way Thanks Q30316120 . . .
pap:Pls help for this programing problem in c++,better with somecomment about why coding that way,thanks

Problem C: Precision and Recall Problem Description In a classification task, the precision for a class is the number of true positives (i.e the number of items correctly labeled as belonging to the positive class) divided by the total number of elements labeled as belonging to the positive class (i.e. the sum of true positives and false positives, which are items incorrectly labeled as belonging to the class). Recall in this context is defined as the number of true positives divided by the total number of elements that actually belong to the positive class (i.e. the sum of true positives and false negatives, which are items which were not labeled as belonging to the positive class but should have been). Given the correct results and the obtained results, please compute the precision and the recall. Input The first line has an integer which indicates the number of test cases. The first line of each test case consists of a binary string of length n which are the correct result of the n items, 1 for true and 0 for false. The second line also consists of a binary string of length n which are the obtained results of the n items, 1 for positive and 0 for negative. You may assume that 0cn<200 and, in each test case, there is at least one positive and at least one actually positive Output For each case, output the precision first and then the recall in one line, each to 2 digits after the decimal point and separated by a space Sample Input Sample Output .00 0.50 0.00 0.00 1010 1000 1001 10110 Show transcribed image text
Expert Answer
Answer to Pap Pls Help Programing Problem C Better Comment Coding Way Thanks Q30316120 . . .
OR