Open kchuangk opened 1 month ago
There's definitely an issue on the cut off on the RHS - the max is always 0.5 Here's another sample code.
The summary stats for the sample are - multiple runs produce a similar result. 25%:0.4925 50%:0.495 75%:0.4974 max:0.5 mean:0.495 median:0.495 min:0.49
use kernel_density_estimation::prelude::*;
fn main() {
let kde=KernelDensityEstimator::new(vec![0.4999999,0.50,0.5000001],Scott,Normal);
let sample3=kde.sample(pdf_dataset.as_slice(),10000);
// println!("{:?}",sample);
let mut df = df!("tester"=>sample1,"tester2"=>sample2,"test_5"=>sample3).unwrap();
let mut file = std::fs::File::create("tmp.csv").unwrap();
CsvWriter::new(&mut file).finish(&mut df).unwrap();
}
Taking the code sample below, the maximum sample is always below 5.0.