| hibernate | R Documentation |
Analyzes time series or sequential data to identify patterns that were once
active but have become dormant. This is the inverse problem from
dormancy_detect - finding patterns that "went to sleep" rather
than patterns that are currently dormant.
hibernate(
data,
time_var = NULL,
window_size = 0.2,
threshold = 0.3,
min_observations = 30,
verbose = FALSE
)
data |
A data frame with a time column or sequential index. |
time_var |
Character. Name of the time/sequence variable. If NULL, uses row order as sequence. Default is NULL. |
window_size |
Integer or numeric. Size of the rolling window for detecting changes. If integer, uses number of observations. If numeric < 1, uses proportion of data. Default is 0.2 (20% of data). |
threshold |
Numeric. Minimum change in pattern strength to be considered hibernation. Default is 0.3. |
min_observations |
Integer. Minimum observations required for analysis. Default is 30. |
verbose |
Logical. Whether to print progress messages. Default is FALSE. |
Hibernation detection is important for:
Understanding system evolution and regime changes
Identifying lost relationships that might return
Detecting structural breaks in relationships
Monitoring degradation of system components
A pattern is considered to have "hibernated" if:
It was strong in an earlier time window
It has weakened significantly in recent windows
The weakening is not due to noise or reduced sample size
A list containing:
hibernated_patterns - Patterns that have become dormant
timeline - When patterns transitioned to dormancy
hibernation_depth - How deeply patterns have hibernated
revival_potential - Likelihood patterns could reawaken
set.seed(42)
n <- 500
time <- 1:n
x <- rnorm(n)
# Relationship that fades over time
effect_strength <- exp(-time / 200)
y <- effect_strength * 0.8 * x + (1 - effect_strength) * rnorm(n)
data <- data.frame(time = time, x = x, y = y)
hib <- hibernate(data, time_var = "time", window_size = 0.15)
print(hib)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.