localProjection           package:fractal           R Documentation

_T_i_m_e _s_e_r_i_e_s _d_e_n_o_i_s_i_n_g _v_i_a _a _l_o_c_a_l _p_r_o_j_e_c_t_i_o_n _f_i_l_t_e_r_i_n_g _t_e_c_h_n_i_q_u_e

_D_e_s_c_r_i_p_t_i_o_n:

     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. .in -5 

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

       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: 'TRUE'.

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: '3'.

max.distance: the neighbor search for each embedding point finds all
          neighbors within *max.distance*. Default: '2*stdev(x)'.

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

n.neighbor: 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* neighbors. Default: 'dimension + 1'.

noise.dimension: 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: '1'.

    tlag: the time lag used when creating the time lag embedding.
          Default: '1'.

_V_a_l_u_e:

     the resulting denoised time series, a vector the same length as
     the original time series.

_R_e_f_e_r_e_n_c_e_s:

     Holger Kantz and Thomas Schreiber (1997), _Nonlinear Time Series
     Analysis_, Cambridge University Press.

_S_e_e _A_l_s_o:

     'embedSeries', 'medianFilter', 'timeLag', 'FNN'.

_E_x_a_m_p_l_e_s:

     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))

