# NOT RUN {
library(cuda.ml)
library(magrittr)
gen_pts <- function() {
centroids <- list(c(1000, 1000), c(-1000, -1000), c(-1000, 1000))
pts <- centroids %>%
purrr::map(~ MASS::mvrnorm(10, mu = .x, Sigma = diag(2)))
rlang::exec(rbind, !!!pts)
}
m <- gen_pts()
clusters <- cuda_ml_dbscan(m, min_pts = 5, eps = 3)
print(clusters)
# }
Run the code above in your browser using DataLab