Sample Entropy
A numeric vector or time series object.
The size of the window in which tho evaluate whether a pattern repeats (default = 2
)
A factor that will determine the threshold for similarity of values, calculated as r x D (default = 0.2
)
Commonly the standard deviation of the time series, the similarity threshold will be calculated as r x D. Note that if the series is detrended and/or standardised and D = NA
the standard deviation will be calculated after the transformations (default = NA
)
Sample rate
Standardise the series using ts_standardise()
with adjustN = FALSE
(default = "mean.sd")
Detrend/standardise before coarse graining. If set to FALSE
, each coarsegrained series will be detrended/standardised separately (default = TRUE
)
Method to use for global detrending (default = "poly"
)
Order of global polynomial trend to remove if removeTrend = "poly"
. If removeTrend = "adaptive"
polynomials 1
to polyOrder
will be evaluated and the best fitting curve (R squared) will be removed (default = 1
)
The relative entropy, SampEn / (-1 * log(1/length(y))) will be returned (default = FALSE
)
Return all the data used in SDA (default = FALSE
)
Silent-ish mode (default = FALSE
)
The sample entropy (SampEn) of the time series y.
info_MSE
Other Information based complexity measures:
inf_MSE()
y <- rnorm(100)
# Similarity threshold is r x D = 0.2 * sd(y)
inf_SampEn(y)
#>
#>
#> fd_SampEn: Sample rate was set to 1.
#>
#> [1] 2.433613
#> attr(,"Relative Entropy")
#> [1] 0.5284524
# Similarity threshold is r = 0.2
inf_SampEn(y, D = 1)
#>
#>
#> fd_SampEn: Sample rate was set to 1.
#>
#> [1] 2.463853
#> attr(,"Relative Entropy")
#> [1] 0.5350189