MCPcopy Create free account
hub / github.com/ZinYY/TreeLoRA / caculate_fuzz

Function caculate_fuzz

metrics.py:147–156  ·  view source on GitHub ↗
(results, data)

Source from the content-addressed store, hash-verified

145## fuzzywuzzy
146########################
147def caculate_fuzz(results, data):
148 scores = 0
149 for output_id in range(len(results)):
150 prediction = results[output_id]
151 target = data[output_id]
152 if prediction == "" or target == "":
153 continue
154 scores += fuzz.ratio(prediction, target)
155 avg_score = scores / len(results)
156 return avg_score
157
158
159########################

Callers 1

evalFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected