Skip to content

Non-dichotomous threat scores #187

Description

@ahuang11

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions