This project provides several fast
It replaces the previous
-
Two-heaps algorithm: expected
$O(n\log n)$ , fast and simple to grasp. -
Segment tree / Fenwick tree variants: guaranteed
$O(n\log n)$ worst case; slower but theoretically clean. - Supports arbitrary quantiles (
$\alpha\in[0,1]$ ) and weighted samples. - Implemented in pure Python + Numba, easy to integrate or adapt. See scikit-learn PR for a Cython implementation of the two-heaps algorithm.
Full technical report: report.ipynb