find_regularity: Find regular motions in the data.

Description Usage Arguments Value Examples

View source: R/find_regularity.r

Description

Find regular motions in the data.

Usage

1
2
find_regularity(data, window_length, skip_window, skip_test01 = 1,
  test01_thresh = 0.05, find_thresh = 20)

Arguments

data

Analyzed data.

window_length

Length of the window for in which the 0-1 test for chaos will be computed.

skip_window

Length of the skip of the window moving in the data.

skip_test01

Length of the skip to take data for calculation the 0-1 test for chaos in the window.

test01_thresh

The threshold to decide about motion.

find_thresh

Precision of found intervals.

Value

The list of optimized regular and chaotic motion borders.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Calculate the logistic map.
cons <- 0.5
data.len <- 17000
chaos.start <- c(5536, 9768)
vec.x <- matrix(cons, data.len, 1)

vec.x[1] <- (2^0.5)/2
for (i in 2:data.len){
  # x_n+1 = r*x_n(1-x_n)
  vec.x[i] <- 3.7*vec.x[i-1]*(1-vec.x[i-1])
}
vec.x[1:(chaos.start[1]-1)] <-cons
vec.x[(chaos.start[2]+1):data.len] <-cons
tr1 <- seq(from = cons, to = vec.x[chaos.start[1]], length.out = 2001)
tr2 <- seq(from = vec.x[chaos.start[2]], to = cons, length.out = 2001)
vec.x[(chaos.start[1]-2000):chaos.start[1]] <- tr1
vec.x[chaos.start[2]:(chaos.start[2]+2000)] <- tr2

# Find regular intervals in vec.x and plot results.
regular_borders <- find_regularity(vec.x, "skip_window" = 1000,
  "window_length" = 3000, "find_thresh" = 300)

dydea documentation built on May 2, 2019, 6:12 a.m.