Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)