nci / scores

scores: Metrics for the verification, evaluation and optimisation of forecasts, predictions or models.
https://scores.readthedocs.io/
Apache License 2.0
67 stars 18 forks source link

FIRM using array-like categorical thresholds #650

Closed rob-taggart closed 2 months ago

rob-taggart commented 2 months ago

@nicholasloveday , there is someone who wants to use FIRM where the categorical thresholds vary across the domain according to climatology. Currently implementation allows for a single fixed sequence of cat thresholds. Do you think it would be much work to refactor it to allow array inputs for categorical thresholds?

nicholasloveday commented 2 months ago

Yes, I can do that in the next few days. Previously I have used FIRM with categorical thresholds that vary across the domain, but that was a pre-scores implementation.

I haven't tested this yet, but this implementation may already work if you pass a list of xarray objects into the categorical_thresholds arg despite what the docstring says. Either way, I'll try to update it in the coming days.