-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add percentage valid points in get_stats()
#644
base: main
Are you sure you want to change the base?
Conversation
2b4958b
to
5368572
Compare
Nice addition, and good catch on the redundancy of the RMSE in this case! 😄 Two small remarks:
Last thought: I didn't see any function to calculate the valid points in the changes, maybe it's not there yet! In that case I would recommend |
Good addition!
Regarding @rhugonnet's comment:
Not so easy to figure out which ones are the most useful between total count, valid count and fraction of valid pixels. It does not make so much sense to give all 3 as one can derive the 3rd from the 2 others... But I think the percentage of valid pixel is more useful than a count (which is generally gonna be large and not very convenient). Also, total count can be easily derived from the data shape... So I would go for either just the percentage of valid pixels, or percentage + total valid count. |
dc529a5
to
4b35217
Compare
@rhugonnet the function to calculate the valid point was already there, but I used @adehecq the stats are applied on the unmasked data : geoutils/geoutils/raster/raster.py Line 1891 in 514ea82
Following your feedback I have changed percentile to percentage , and I added the valid points stat 😃
|
get_stats()
get_stats()
8089811
to
d4d21d0
Compare
8216872
to
30c6300
Compare
Resolves GlacioHack/xdem#679.
Description
valid points
andpercentage valid points
statistic calculation, as the number of finite values divided by the number of values in the unmasked Raster.valid points
andpercentage valid points
in thedict()
returned byget_stats()
, add aliases.valid points
andpercentage valid points
intest_stats()
method intest_raster
.valid points no mask
andpercentage valid points no mask
to compute the same stats as above but without masking values.