Description Usage Arguments Value References See Also Examples

Given a time series, *X[t]*, this function performs one iteration
of the local projection filtering algorithm as described in Kantz and
Schreiber [1]. This noise reduction algorithm is summarized in the
following steps:

- 1.
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.- 2.
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.

- 3.
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.- 4.
The components of the corrected embedding vectors are averaged to compute the overall correction for each point in the original time series.

1 2 | ```
localProjection(x, dimension=3, tlag=timeLag(x), n.neighbor=dimension + 1,
max.distance=2*stdev(x), metric=Inf, noise.dimension=1, corr.curve=TRUE)
``` |

`x` |
a vector containing a uniformly-sampled real-valued time series. |

`corr.curve` |
boolean argument. If true, the center-of-mass
vectors will be corrected for curvature effects. Default: |

`dimension` |
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
deterministic. Default: |

`max.distance` |
the neighbor search for each embedding point
finds all neighbors within |

`metric` |
the metric used when searching for
neighbors. Supported values are 1 (1-norm), 2 (2-norm), and Inf
(infinity norm). Default: |

`n.neighbor` |
the minimum number of neighbors acceptable to
define a neighborhood for each embedding point. If the neighbor search
using input |

`noise.dimension` |
the assumed dimension of the (local) noise
subspace. This should be equal to the embedding dimension, |

`tlag` |
the time lag used when creating the time lag
embedding. Default: |

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.

`embedSeries`

, `medianFilter`

, `timeLag`

, `FNN`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
## Not run:
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))
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.