gtkfi / ArcSDM

Spatial Data Modeler 6 for ArcGIS Pro
32 stars 18 forks source link

Mathematical bug with ascending weights calculations with missing data #128

Open tachyon-work opened 4 years ago

tachyon-work commented 4 years ago

Found a pretty serious mathematical bug with the ascending weights calculations if you have a missing data class in your input map (e.g. the -99 default value). If you take a look at the following weights table below, you will see that it counts -99 as the lowest value and starts the cumulative training point and area calculations from there. The code should reset the amount of area and amount of training points to 0 after it has dealt with the missing data class for ascending. The current code messes up all of the ascending weights calculations and grossly underestimates the actual contrast and studentised contrast values (basically saying the results aren't statistically significant when they are actually very good)!

This is not a problem with the descending or categorical weights calculations, only ascending - and again, only if you have a missing data (-99) class in your input map.

image

Unsure if this is related to this? https://github.com/gtkfi/ArcSDM/issues/20