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

Handle weightings argument to scores #26

Closed
tennlee opened this issue Jul 26, 2023 · 1 comment · Fixed by #34
Closed

Handle weightings argument to scores #26

tennlee opened this issue Jul 26, 2023 · 1 comment · Fixed by #34
Milestone

Comments

@tennlee
Copy link
Collaborator

tennlee commented Jul 26, 2023

The weightings keyword argument was added as standard to function signatures but not implemented. This is intended to allow a weightings array to be passed through, representing things like area averaging, population density weighting or another kind of importance or significance weighting. Requirements need to first be developed more clearly and then the functionality implemented.

@tennlee
Copy link
Collaborator Author

tennlee commented Aug 11, 2023

  • A weights array may be specified which would multiply pixelwise after the error is calculated and before dimensionality reduction
  • The most common example of this is latitude-weighting but there are several other important use cases
  • Any dimensions found in the weightings array will be assumed to be additional weighting dimensions and that a weighted score is wanted for each
  • A utility function should be added to scores.utils which will generate a latitude-weighted array which can be used for a given lat/lon indexed array in LLXY projection. Other projections may be helpful but are not critical for the first implementation.
  • NaNs will result in the exclusion of errors at that location from calculations (will not contribute at all rather than being zero)

Tests should include:
o Calculating a standard weightings array for a 10x10 LLXY grid and ensure weightings are as expected
o Supplying a weightings array to continuous scoring function and make sure the results are correct
o Make sure specifying a weightings array full of '1s' does not change the result compared to the ordinary scoring function for some examples
o Make sure specifying an array full of zeroes doesn't cause exceptions
o NaNs in the weights array
o A weights array consisting entirely of NaNs

@tennlee tennlee linked a pull request Aug 23, 2023 that will close this issue
@tennlee tennlee added this to the Version 0.4 milestone Aug 24, 2023
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

Successfully merging a pull request may close this issue.

1 participant