If I'm not mistaken, I think threat scores can be non-dichotomous? Is this decorator used only because it hasn't been implemented yet or am I mistaken?
def dichotomous_only(method):
"""Decorator for methods that are defined for dichotomous forecasts only
"""
@wraps(method)
def wrapper(self, *args, **kwargs):
if not self.dichotomous:
raise AttributeError(
f'{method.__name__} can only be computed for dichotomous (2-category) data'
)
return method(self, *args, **kwargs)
return wrapper
If I'm not mistaken, I think threat scores can be non-dichotomous? Is this decorator used only because it hasn't been implemented yet or am I mistaken?