Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def IBA_alpha(self, alpha):
"""
Calculate IBA_alpha score.
:param alpha: alpha parameter
:type alpha: float
:return: IBA_alpha score for classes as dict
"""
try:
IBA_dict = {}
for i in self.classes:
IBA_dict[i] = IBA_calc(self.TPR[i], self.TNR[i], alpha=alpha)
return IBA_dict
except Exception:
return {}