metric
– implementation of the cocktail distance coefficient¶
-
cockatoo.metric.
distance
(ck1, ck2, weights=None)[source]¶ Compute the cocktail distance coefficient between cocktails.
This function implements the cocktails distance coefficient defined as:
\[CD_{coeff}(i,j) = \frac{1}{sum(w)}\Biggl(\Bigl(\frac{\left|E(pH_{i})-E(pH_{j})\right|}{14}\Bigr)w_{1}+BC(F_{i},F_{j})w_{2}\Biggr)\]Where \(w=\left\{w_{1},w_{2}\right\}\) are weights, \(w_{k} \ge 0\), \(sum(w) > 0\). \(F_{i}\) is the fingerprint of cocktail \(i\) and \(E(pH_{i})\) is n estimate of the pH in condition \(i\) normalized by a maxium pH of 14. \(BC(F_{i},F_{j})\) is the Bray-Curtis dissimilarity measure between cocktail fingerprints \(i\) and \(j\).