How to use the xskillscore.threshold_brier_score function in xskillscore

To help you get started, we’ve selected a few xskillscore examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bradyrx / climpred / climpred / metrics.py View on Github external
https://doi.org/10.1175/1520-0493(1950)078<0001:VOFEIT>2.0.CO;2.

    See also:
        * properscoring.threshold_brier_score
        * xskillscore.threshold_brier_score

    Example:
        >>> compute_perfect_model(ds, control,
                                  metric='threshold_brier_score', threshold=.5)
    """
    if 'threshold' not in metric_kwargs:
        raise ValueError('Please provide threshold.')
    else:
        threshold = metric_kwargs['threshold']
    # switch args b/c xskillscore.threshold_brier_score(verif, forecasts)
    return threshold_brier_score(verif, forecast, threshold)