Embed function

Embed data with time lags

Embed data with time lags

Embed performs Takens time-delay embedding on columns.

Embed(path = "./", dataFile = "", dataFrame = NULL, E = 0, tau = -1, columns = "", verbose = FALSE)

Arguments

  • path: path to dataFile.
  • dataFile: .csv format data file name. The first column must be a time index or time values. The first row must be column names. One of dataFile or dataFrame are required.
  • dataFrame: input data.frame. The first column must be a time index or time values. The columns must be named. One of dataFile or dataFrame are required.
  • E: embedding dimension.
  • tau: integer time delay embedding lag specified as number of time column rows.
  • columns: string of whitespace separated column name(s), or vector of column names used to create the library. If individual column names contain whitespace place names in a vector, or, append ',' to the name.
  • verbose: logical to produce additional console reporting.

Returns

A data.frame with lagged columns. E columns for each variable specified in columns.

Details

Each columns item will have E-1 time-lagged vectors created. The column name is appended with (t-n). For example, data columns X, Y, with E = 2 will have columns named X(t-0) X(t-1) Y(t-0) Y(t-1).

The returned data.frame does not have a time column. The returned data.frame is truncated by tau * (E-1) rows to remove state vectors with partial data (NaN elements).

Examples

data(circle) embed <- Embed( dataFrame = circle, E = 2, tau = -1, columns = "x y" )
  • Maintainer: Joseph Park
  • License: BSD_2_clause + file LICENSE
  • Last published: 2024-04-06

Useful links