Time series denoising via a local projection filtering technique
Given a time series, X[t], this function performs one iteration of the local projection filtering algorithm as described in Kantz and Schreiber . This noise reduction algorithm is summarized in the following steps:
A time lag embedding of dimension dimension is formed using X[t], where dimension is typically at least twice the dimension at which the underlying dynamics of X[t] become deterministic. At each point in the embedding a neighborhood is determined by a given radius and a given minimum number of required neighbors.
Center-of-mass vectors are computed for each embedding point neighborhood and corresponding covariance matrices are computed with respect to the center-of-maxx vectors.
The eigenvectors corresponding to the noise.dimension smallest eigenvalues are assumed to form a (local) basis for the noise subspace and the projection of the embedding vector onto these "noise" eigenvectors is subtracted from the original embedding vector.
The components of the corrected embedding vectors are averaged to compute the overall correction for each point in the original time series.
a vector containing a uniformly-sampled real-valued time series.
boolean argument. If true, the center-of-mass
vectors will be corrected for curvature effects. Default:
the dimension of the time lag embedding created from the
given time series. This value should be at least twice the dimension
in which the underlying dynamics of the time series become
the neighbor search for each embedding point
finds all neighbors within max.distance. Default:
the metric used when searching for
neighbors. Supported values are 1 (1-norm), 2 (2-norm), and Inf
(infinity norm). Default:
the minimum number of neighbors acceptable to
define a neighborhood for each embedding point. If the neighbor search
using input max.distance does not produce at least this number of
neighbors a new search is performed which finds exactly n.neighbor
the assumed dimension of the (local) noise
subspace. This should be equal to the embedding dimension, dimension,
minus the dimension where the underlying dynamics of the time series
become deterministic. Default:
the time lag used when creating the time lag
the resulting denoised time series, a vector the same length as the original time series.
Holger Kantz and Thomas Schreiber (1997), Nonlinear Time Series Analysis, Cambridge University Press.
1 2 3 4 5 6 7 8 9 10 11
x <- beamchaos@data x <- x - mean(x) sigma <- stdev(x) xnoise <- x + rnorm(length(x)) * sigma / 3 xclean <- localProjection(xnoise, dimension=7, noise.dimension=5, max.distance=3*sigma, n.neighbor=100) y <- data.frame(xclean, xnoise, x) stackPlot(x=positions(beamchaos), y=y, ylab=c("denoised","noisy","original"), ylim=range(y))
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.