Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def F_beta(self, beta):
"""
Calculate FBeta score.
:param beta: beta parameter
:type beta : float
:return: FBeta score for classes as dict
"""
try:
F_dict = {}
for i in self.TP.keys():
F_dict[i] = F_calc(
TP=self.TP[i],
FP=self.FP[i],
FN=self.FN[i],
beta=beta)
return F_dict
except Exception:
return {}