View source: R/main_function.R
get_cps | R Documentation |
This function clusters alarms into groups and identifies the starting points of the alarm clusters.
If the next alarm occurs within a specified window size (w
) from the current alarm,
it will be considered part of the current cluster. Otherwise, a new cluster will be formed.
get_cps(alarms, w)
alarms |
A numeric vector. The alarms raised during the monitoring process. |
w |
An integer. The window size used to group alarms into clusters. |
A numeric vector containing the starting points of the alarm clusters.
If the next alarm is within w
observations of the current alarm,
the next alarm will be considered part of the current alarm cluster.
Otherwise, a new cluster is formed and the next alarm is considered the beginning
of a new alarm cluster.
# Example usage:
alarms <- c(10, 15, 30, 35, 60)
change_points <- get_cps(alarms, w = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.