Skip to content
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

Value Error depicting the absence of no data values. #187

Open
Dipsi27 opened this issue Jun 25, 2024 · 2 comments
Open

Value Error depicting the absence of no data values. #187

Dipsi27 opened this issue Jun 25, 2024 · 2 comments

Comments

@Dipsi27
Copy link

Dipsi27 commented Jun 25, 2024

I have used two binary rasters : candidate and benchmark. Both maps have a shape of (2271, 4552). The benchmark raster contains two classes: 0 for no flood and 2 for flood. The candidate raster also contains two classes: 1 for no flood and 2 for flood. When I run the ‘gval.categorical_compare’ command, the following error appears.

ValueError: Both candidate and benchmark maps need to have nodata values set.

What do the ‘no data’ values indicate?

benchmark
candidate
error

@GregoryPetrochenkov-NOAA
Copy link
Collaborator

The reason we require nodata values in a dataset is that they represent where the model domain of a map ends. Since gridded datasets are square, they often contain cells that were not originally in the modeled domain, in this case a flood map. Cells not in the domain but marked as not flooded will affect the overall evaluations either artificially improving or regressing their metrics in an agreement map. While in some cases this cannot be avoided if the original data does not provide nodata information delineating the model domain, we still want a user to explicitly assign nodata values before running a comparison so they are aware it is not included. Please consult this tutorial in order to see how to set a nodata value: https://noaa-owp.github.io/gval/SphinxTutorial.html

@Dipsi27
Copy link
Author

Dipsi27 commented Jun 25, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants