T-Digest algorithm in rust
This implementation is following Facebook folly's implementation
Installation
Add this to your Cargo.toml
:
[]
= "0.2"
then you are good to go. If you are using Rust 2015 you have to extern crate tdigest
to your crate root as well.
Example
use TDigest;
let t = new_with_size;
let values: = .map.collect;
let t = t.merge_sorted;
let ans = t.estimate_quantile;
let expected: f64 = 990_000.0;
let percentage: f64 = .abs / expected;
assert!;