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.
We encountered missing values in our elevation uncertainty layers, despite there being meant to be a 1:1 match between uncertainty and elevation:
This turned out to occur in pixels where the modelled elevation value sucessfully split observations perfectly, resulting in no misclassified observations. Because you can't calculate the variance of zero observations, we were getting back
nodata
for these pixels.This PR addresses this issue by adding a new
min_misclassified
param: if a pixel has less thann
misclassified observations, it is assigned an uncertainty value of 0 metres. This helps fix both this issue, and a related issue where we could sometimes get extremely high uncertainty values caused by trying to calculate the variance of a very small set of misclassified points.