We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ff95a0 commit f1386c4Copy full SHA for f1386c4
keras/src/metrics/metrics_utils.py
@@ -43,17 +43,20 @@ class AUCCurve(Enum):
43
44
ROC = "ROC"
45
PR = "PR"
46
+ PRGAIN = "PRGAIN"
47
48
@staticmethod
49
def from_str(key):
50
if key in ("pr", "PR"):
51
return AUCCurve.PR
52
elif key in ("roc", "ROC"):
53
return AUCCurve.ROC
54
+ elif key in ("prgain", "PRGAIN"):
55
+ return AUCCurve.PRGAIN
56
else:
57
raise ValueError(
58
f'Invalid AUC curve value: "{key}". '
- 'Expected values are ["PR", "ROC"]'
59
+ 'Expected values are ["PR", "ROC", "PRGAIN"]'
60
)
61
62
0 commit comments