#NEWLINE# def evaluateDuplicates( found_dupes , true_dupes ) : #NEWLINE# #INDENT# true_positives = found_dupes . intersection ( true_dupes ) #NEWLINE# false_positives = found_dupes . difference ( true_dupes ) #NEWLINE# uncovered_dupes = true_dupes . difference ( found_dupes ) #NEWLINE# print ( 'found duplicate' ) #NEWLINE# print ( len ( found_dupes ) ) #NEWLINE# print ( 'precision' ) #NEWLINE# print ( ( 1 - ( len ( false_positives ) / float ( len ( found_dupes ) ) ) ) ) #NEWLINE# print ( 'recall' ) #NEWLINE# print ( ( len ( found_dupes ) / float ( len ( true_dupes ) ) ) )