Skip to content

Commit 208a762

Browse files
authored
Remove HNSW (#168)
* Replace HNSW in optics * Add NN error handling to optics * Get rid of HNSW in linfa-kernel * Propagate generic nn algo to kernel params
1 parent 01f912a commit 208a762

9 files changed

Lines changed: 371 additions & 423 deletions

File tree

algorithms/linfa-clustering/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ default-features = false
2828
features = ["std", "derive"]
2929

3030
[dependencies]
31-
hnsw = "0.8"
3231
ndarray = { version = "0.15", features = ["rayon", "approx"]}
3332
ndarray-linalg = "0.14"
3433
ndarray-rand = "0.14"
@@ -40,7 +39,6 @@ thiserror = "1.0"
4039
partitions = "0.2.4"
4140
linfa = { version = "0.4.0", path = "../..", features = ["ndarray-linalg"] }
4241
linfa-nn = { version = "0.1.0", path = "../linfa-nn" }
43-
rand_pcg = "0.3.1"
4442
noisy_float = "0.2.0"
4543

4644
[dev-dependencies]

algorithms/linfa-clustering/examples/optics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ fn main() {
4545
"reachability.npy",
4646
&analysis
4747
.iter()
48-
.map(|&x| x.reachability_distance().unwrap_or(f64::INFINITY))
48+
.map(|x| x.reachability_distance().unwrap_or(f64::INFINITY))
4949
.collect::<Array<_, _>>(),
5050
)
5151
.expect("Failed to write .npy file");
5252
write_npy(
5353
"indexes.npy",
5454
&analysis
5555
.iter()
56-
.map(|&x| x.index() as u32)
56+
.map(|x| x.index() as u32)
5757
.collect::<Array<_, _>>(),
5858
)
5959
.expect("Failed to write .npy file");

0 commit comments

Comments
 (0)