pub fn cluster_variance(node: &ClusterNode, variances: &[f64]) -> f64Expand description
Compute average variance for a cluster (sum of leaf variances / leaf count).
Bug fix (#1238): previously returned the raw SUM, which scaled linearly with cluster size. A 17-leaf cluster had ~17x the “variance” of a 1-leaf cluster, causing inverse-variance bisection to push 89-99% weight into the smaller cluster. Dividing by leaf count normalizes for cluster size.