CASA0005repo icon indicating copy to clipboard operation
CASA0005repo copied to clipboard

DBSCAN code

Open andrewmaclachlan opened this issue 3 years ago • 0 comments

Updated from MSc student

I wrote a bit of code for creating convex hulls for the dbscan output, which are a bit more nicely shaped than those in the practical, maybe someone will find it useful :slightly_smiling_face: convex hulls to wrap around points

chulls <- data.frame() for (cluster in 1:max(BluePlaquesSubPoints$dbcluster)) { cluster_data <- BluePlaquesSubPoints %>% filter(dbcluster == cluster) ch <- chull(cluster_data$coords.x1, cluster_data$coords.x2) chulls <- chulls %>% bind_rows(cluster_data[c(ch), ]) }

andrewmaclachlan avatar Jan 14 '22 13:01 andrewmaclachlan