shawnlaffan / biodiverse

A tool for the spatial analysis of diversity
http://shawnlaffan.github.io/biodiverse/
GNU General Public License v3.0
74 stars 19 forks source link

Matrices - summary stats are imprecise #866

Closed shawnlaffan closed 1 year ago

shawnlaffan commented 1 year ago

The summary stats for the matrices use the BY_VALUE hash to same some calculations.

However, that hash was restructured a long time ago to index based on sprintf("%.2g", $val) to reduce its size.

The end result is that the calculations are inaccurate.

A more accurate approach is to use Statistics::Descriptive::PDL::SampleWeighted from the original values.