MCPcopy Create free account
hub / github.com/Open-Quant/openquant / absolute_angular_distance

Function absolute_angular_distance

crates/openquant/src/codependence.rs:165–168  ·  view source on GitHub ↗
(x: &[f64], y: &[f64])

Source from the content-addressed store, hash-verified

163}
164
165pub fn absolute_angular_distance(x: &[f64], y: &[f64]) -> CodependenceResult<f64> {
166 let corr_coef = corrcoef(x, y)?;
167 Ok((0.5 * (1.0 - corr_coef.abs())).sqrt())
168}
169
170pub fn squared_angular_distance(x: &[f64], y: &[f64]) -> CodependenceResult<f64> {
171 let corr_coef = corrcoef(x, y)?;

Callers 2

test_correlationsFunction · 0.85

Calls 1

corrcoefFunction · 0.70

Tested by 1

test_correlationsFunction · 0.68