View source: R/event_functions_3d.R
get_clusters_3d | R Documentation |
This function extracts events from a three-dimensional (2D spatial x 1D time) data stream.
get_clusters_3d(dat, thres = 0.95, epsilon = 3, miniPts = 15)
dat |
The data matrix |
thres |
The cut-off quantile. Default is set to |
epsilon |
The |
miniPts |
The |
A list with following components
|
The cluster assignment according to DBSCAN output. |
|
The data of this cluster assignment. |
set.seed(1) arr <- array(rnorm(12000),dim=c(40,25,30)) arr[25:33,12:20, 20:23] <- 10 # getting events out <- get_clusters_3d(arr, thres=0.985) # plots oldpar <- par(mfrow=c(1,3)) plot(out$data[,c(1,2)], xlab="x", ylab="y", col=as.factor(out$clusters$cluster)) plot(out$data[,c(1,3)], xlab="x", ylab="z",col=as.factor(out$clusters$cluster)) plot(out$data[,c(2,3)], xlab="y", ylab="z",col=as.factor(out$clusters$cluster)) par(oldpar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.