handle_noise | R Documentation |
This function finds noise from the clustering results and label it with
-1
.
handle_noise(global_membership, timeID, minPts, minTime)
global_membership |
Integer. A vector of membership labels. |
timeID |
Integer. A vector of time indexes. |
minPts |
Numeric (>0). Minimum number of hot spots in a cluster. |
minTime |
Numeric (>=0). Minimum length of time of a cluster. Unit is time index. |
For more details about the clustering algorithm and the arguments
minPts
and minTime
, please check the documentation
of hotspot_cluster()
.
This function performs the step 4 of the clustering algorithm. It uses a
given threshold (minimum number of points and minimum length of time) to
find noise and label it with -1
.
Integer. A vector of membership labels.
# Define membership labels and timeID for 10 observations
global_membership <- c(1,1,1,2,2,2,2,2,2,3,3,3,3,3,3)
timeID <- c(1,2,3,2,3,3,4,5,6,3,3,3,3,3,3)
# Handle noise with different values of minPts and minTime
handle_noise(global_membership, timeID, 4, 0)
handle_noise(global_membership, timeID, 4, 1)
handle_noise(global_membership, timeID, 3, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.