Skip to content

Commit

Permalink
chore: better params for search
Browse files Browse the repository at this point in the history
  • Loading branch information
nishaq503 committed Aug 28, 2024
1 parent 97eeaa2 commit 65b00d7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion crates/abd-clam/src/cakes/search/rnn_clustered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ where
.partition(|&(c, d)| (c.radius() + d) < radius);
confirmed.append(&mut terminal);

(terminal, non_terminal) = non_terminal.into_par_iter().partition(|&(c, _)| c.is_leaf());
(terminal, non_terminal) = non_terminal.into_iter().partition(|&(c, _)| c.is_leaf());
straddlers.append(&mut terminal);

candidates = non_terminal.into_iter().flat_map(|(c, _)| c.child_clusters()).collect();
Expand Down
18 changes: 9 additions & 9 deletions crates/results/cakes/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,14 @@ fn main() -> Result<(), String> {
// Note: Starting search benchmarks here

let (_, queries): (Vec<_>, Vec<_>) = queries.into_iter().unzip();
let (data, codec_data) = {
let metric = StringDistance::Levenshtein.metric();
let mut data = data;
data.set_metric(metric.clone());
let mut codec_data = codec_data;
codec_data.set_metric(metric);
(data, codec_data)
};
// let (data, codec_data) = {
// let metric = StringDistance::Levenshtein.metric();
// let mut data = data;
// data.set_metric(metric.clone());
// let mut codec_data = codec_data;
// codec_data.set_metric(metric);
// (data, codec_data)
// };

let algorithms = {
let mut algorithms = Vec::new();
Expand All @@ -321,7 +321,7 @@ fn main() -> Result<(), String> {
algorithms.push(Algorithm::RnnClustered(radius));
}

for k in [1, 10] {
for k in [1, 10, 100] {
// algorithms.push(Algorithm::KnnLinear(k));
algorithms.push(Algorithm::KnnRepeatedRnn(k, 2));
algorithms.push(Algorithm::KnnBreadthFirst(k));
Expand Down

0 comments on commit 65b00d7

Please sign in to comment.