You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
403 B
16 lines
403 B
def f1_score(y_true, y_pred, labels, average):
|
|
return 0
|
|
|
|
|
|
class Result:
|
|
|
|
def __init__(self, precision, recall, average, label):
|
|
self.precision = precision
|
|
self.recall = recall
|
|
self.average = average
|
|
self.label = label
|
|
self.f1_score = 2 * (precision * recall) / (precision + recall)
|
|
|
|
def print_result(self):
|
|
print('F1 Score :: ',self.f1_score)
|