18 inline double bbeta(
const std::vector<double>& x,
19 const std::vector<double>& y,
20 std::vector<double> weights = std::vector<double>())
22 utils::check_sizes(x, y, weights);
26 double med_x = impl::median(x, weights);
27 double med_y = impl::median(y, weights);
29 if (weights.size() == 0)
30 weights = std::vector<double>(n, 1.0);
34 for (
size_t i = 0; i < n; i++) {
35 if ((x[i] <= med_x) && (y[i] <= med_y))
37 else if ((x[i] > med_x) && (y[i] > med_y))
41 return 2 * w_acc / utils::sum(weights) - 1;
Weighted dependence measures.
Definition: bbeta.hpp:11