Order Statistics
GraphIdx.Stats
— Module.Some statistical functions, mainly related to (weighted) median computations.
GraphIdx.Stats.permcumsum
— Method.permcumsum(w, pi)
Return the cumulative sums over w
in order pi
.
GraphIdx.Stats.weighted_median
— Method.weighted_median(x, [w, [∂ ]])
Compute a generalized weighted order statistics. Hereby, we minimize
\[\min_{t} \sum_{i} w_i |t - x_i| + f(t)\]
whereby ∂
is the derivative of the convex function $f$ (by default constant 0
for ordinary weighted median).
Return the interval $[a, b]$ containing the minimizer (if unique $a = b$).
Todo
Compare the sorting to binary search and median strategies. Maybe use SIMD for median.