v0.2.7
Major updates:
- Fixed the calculation of weighted Euclidean distance. Previous versions would have calculated the distance of weighted items from unweighted targets, rather than comparing the items and target in the same space. This has been fixed, and will change the results of any code using weights in
euc_dists()
orcontrol_for_euc()
. - Implemented weighting standardisation in calculating Euclidean distances, so that
c(1, 3)
,c(10, 30)
, andc(100.33, 300.99)
are all equivalent toc(0.5, 1.5)
. This means that similar tolerances can be used when weighting schemes change. The standardisation isweights/mean(weights)
so thatsum(weights)==length(weights)
. Standardisation can be disabled by settingstandardise_weights=FALSE
.
Minor updates:
- Updated the Euclidean distance vignette to reflect the changes made to weighting.
- Added tests that weights and weight standardisation for Euclidean distance work as described.