-
Notifications
You must be signed in to change notification settings - Fork 18
Scores [Categorical] Equitable Threat Score Model vs Obs #2385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
James Warner (jwarner8)
wants to merge
21
commits into
main
Choose a base branch
from
2377_add_ets
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
a4365b9
add ets section to gui
jwarner8 d1c4b15
add ets to rose-suite.conf and revert pod default to false
jwarner8 adb176e
generalise
jwarner8 342facc
add new ets recipe
jwarner8 6a4d8fb
generalise categorical operaters/vars
jwarner8 8321748
add new entry for ets
jwarner8 a558709
add ets operator
jwarner8 3552d9f
generalised operator/threshold
jwarner8 3a9d898
add extra description
jwarner8 3de0ecd
add additional text
jwarner8 b64d895
add provisional tests
jwarner8 8653f36
correct arg vals
jwarner8 bba8a17
remove backslash that breaks formatting
jwarner8 21e8fb8
Merge branch 'main' into 2377_add_ets
jwarner8 953de9e
add tolerance args
jwarner8 b20a812
tidy up tests
jwarner8 6421104
Merge branch '2377_add_ets' of github.com:MetOffice/CSET into 2377_ad…
jwarner8 a06aa3a
remove triggers
jwarner8 561003a
Merge branch 'main' into 2377_add_ets
jwarner8 98423a8
update recipes with plot construction info and additional references
jwarner8 0a88708
Merge branch 'main' into 2377_add_ets
jwarner8 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
src/CSET/recipes/verification/surface_categorical_model_obs_ets.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| category: Scores Categorical | ||
| title: Timeseries of ETS for "$VARNAME over $SUBAREA_NAME, using threshold $OPERATOR $THRESHOLD" | ||
| description: | | ||
|
|
||
| Extracts and plots the ETS for $VARNAME for each model against observations as a timeseries. | ||
|
|
||
| The Equitable Threat Score (ETS) in [`scores`](https://scores.readthedocs.io/en/stable/api.html#scores.categorical.BasicContingencyManager.equitable_threat_score) | ||
| evaluates the accuracy of forecasts for events that meet a specified threshold, | ||
| hile accounting for correct forecasts that could occur purely by chance. Unlike the Probability of Detection (POD), | ||
| ETS considers hits, misses, and false alarms, providing a more balanced assessment of forecast skill. | ||
|
|
||
| For example, if the threshold is 290 K and op_func is gt (greater than), an observation of 292 K and a forecast of 295 K | ||
| would be counted as a hit. ETS adjusts the total number of hits by removing the number of hits expected due to random chance. | ||
|
|
||
| It is calculated as: | ||
|
|
||
| ETS = frac{hits - hits_{random}} | ||
| {hits + misses + false\ alarms - hits_{random}} | ||
|
|
||
|
|
||
| where | ||
|
|
||
| hits_{random} = frac{(hits + misses)(hits + false\ alarms)}{total count} | ||
|
|
||
| ETS ranges from -1/3 to 1, where 1 indicates a perfect forecast, 0 indicates no skill beyond random chance, and negative values indicate worse than | ||
| random chance. | ||
|
|
||
| References | ||
| https://scores.readthedocs.io/en/stable/api.html#scores.categorical.BasicContingencyManager.equitable_threat_score | ||
|
|
||
| steps: | ||
| - operator: read.read_cubes | ||
| file_paths: $INPUT_PATHS | ||
| model_names: $MODEL_NAME | ||
| constraint: | ||
| operator: constraints.combine_constraints | ||
| varname_constraint: | ||
| operator: constraints.generate_var_constraint | ||
| varname: ['observed_$VARNAME', '$VARNAME'] | ||
| cell_methods_constraint: | ||
| operator: constraints.generate_cell_methods_constraint | ||
| cell_methods: [] | ||
| pressure_level_constraint: | ||
| operator: constraints.generate_level_constraint | ||
| coordinate: "pressure" | ||
| levels: [] | ||
| subarea_type: $SUBAREA_TYPE | ||
| subarea_extent: $SUBAREA_EXTENT | ||
|
|
||
| - operator: misc.extract_common_points | ||
| coordinate: time | ||
|
|
||
| - operator: misc.combine_cubes_into_cubelist | ||
| first: | ||
| operator: filters.filter_cubes | ||
| constraint: | ||
| operator: constraints.generate_var_constraint | ||
| varname: observed_$VARNAME | ||
| second: | ||
| operator: regrid.interpolate_to_point_cube | ||
| fld: | ||
| operator: filters.filter_multiple_cubes | ||
| constraint: | ||
| operator: constraints.combine_constraints | ||
| var_constraint: | ||
| operator: constraints.generate_var_constraint | ||
| varname: $VARNAME | ||
| point_cube: | ||
| operator: filters.filter_cubes | ||
| constraint: | ||
| operator: constraints.generate_var_constraint | ||
| varname: observed_$VARNAME | ||
|
|
||
| - operator: scoreswrappers.scores_ets_model_obs | ||
| preserved_coordinates: "time" | ||
| threshold: $THRESHOLD | ||
| op_func: $OPERATOR | ||
|
|
||
| - operator: plot.plot_line_series | ||
|
|
||
| - operator: write.write_cube_to_nc | ||
| overwrite: True | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.