Closed thomased closed 3 years ago
So I think I've fixed it, but it was two separate issues.
a2cc1c6c32e81cce51bc79b9432e584dca25fdc8 - strips non-numeric data (which, for example, the hexagon & categorical models return) which would cause failure. 06e28a52ec9c61d8f482cc1300f1a5607e8f1b4a - rescales the coordinate systems of colourspace data by adding a constant, because they're often negative and you can't calculate the geometric mean of a negative value, so it'd cause problems and/or uninformative failure.
Just to double-check my logic since my maths is crap, does that second solution make sense to you @Bisaloo? For colspace
objects bootcoldist()
calculates distances using their coordinates. As part of the bootstrapping though we need to take the geometric mean, so it causes problems when coordinates are negative, as they often are. So I've just...added 100 to all colspace
x-y-z coordinates since that won't affect the resulting distances calculations (right?). My quick testing says no, but just want to be sure...
It's not an issue for vismodel()
/receptor-noise calculations since bootcoldist()
uses qcatch values for that, which are basically never negative.
It gets tangled up in the internal
gmean
function inbootcoldist()
(line 62).