get_clusters: Extracts events from a two-dimensional data stream

View source: R/event_functions_2d.R

get_clustersR Documentation

Extracts events from a two-dimensional data stream

Description

This function extracts events from a two-dimensional (1 spatial x 1 time) data stream.

Usage

get_clusters(
  dat,
  filename = NULL,
  thres = 0.95,
  vis = FALSE,
  epsilon = 5,
  miniPts = 10,
  rolling = TRUE
)

Arguments

dat

The data matrix

filename

If set, the figure of extracted events are saved in this name. The filename needs to include the correct folder and file name.

thres

The cut-off quantile. Default is set to 0.95. Values greater than the quantile will be clustered. The rest is not clustered.

vis

If TRUE, the window data and the extracted events are plotted for a 2D data stream.

epsilon

The eps parameter in dbscan function in the package dbscan

miniPts

The minPts parameter in dbscan function in the package dbscan

rolling

This parameter is set to TRUE if rolling windows are considered.

Value

A list with following components

clusters

The cluster assignment according to DBSCAN output.

data

The data of this cluster assignment.

Examples

out <- gen_stream(2, sd=15)
zz <- as.matrix(out$data)
clst <- get_clusters(zz, vis=TRUE)


eventstream documentation built on May 16, 2022, 9:06 a.m.