aws / random-cut-forest-by-aws

An implementation of the Random Cut Forest data structure for sketching streaming data, with support for anomaly detection, density estimation, imputation, and more.
https://github.com/aws/random-cut-forest-by-aws
Apache License 2.0
206 stars 33 forks source link

rust summarize_list error #361

Closed acpeakhour closed 1 year ago

acpeakhour commented 1 year ago

When using the Rust lib, BasicTRCF gives an indexing error. The below patch seems to fix this.

@@ -56,14 +56,14 @@ impl FieldSummarizer { &self, pointstore: &dyn PointStore, point_list_with_distance: &[(f64, usize, f64)], missing: &[usize] ) -> SampleSummary { let mut distance_list: Vec = point_list_with_distance.iter().map(|a| a.2).collect(); distance_list.sort_by(|a, b| a.partial_cmp(&b).unwrap()); let mut threshold = 0.0; if self.centrality > 0.0 { let mut always_include = 0;

sudiptoguha commented 1 year ago

duplicate with 362