MyNixOS website logo
Description

Empirical Dynamic Modeling ('EDM').

An implementation of 'EDM' algorithms based on research software developed for internal use at the Sugihara Lab ('UCSD/SIO'). The package is implemented with 'Rcpp' wrappers around the 'cppEDM' library. It implements the 'simplex' projection method from Sugihara & May (1990) <doi:10.1038/344734a0>, the 'S-map' algorithm from Sugihara (1994) <doi:10.1098/rsta.1994.0106>, convergent cross mapping described in Sugihara et al. (2012) <doi:10.1126/science.1227079>, and, 'multiview embedding' described in Ye & Sugihara (2016) <doi:10.1126/science.aag0863>.

rEDM

Overview

The rEDM package is a collection of methods for Empirical Dynamic Modeling (EDM). EDM is based on the mathematical theory of reconstructing attractor manifolds from time series data, with applications to forecasting, causal inference, and more. It is based on research software developed for the Sugihara Lab (University of California San Diego, Scripps Institution of Oceanography).

Empirical Dynamic Modeling (EDM)

This package implements an R wrapper of EDM tools from the cppEDM library. Introduction and documentation are are avilable online, or in the package tutorial.

Functionality includes:

  • Simplex projection (Sugihara and May 1990)
  • Sequential Locally Weighted Global Linear Maps (S-map) (Sugihara 1994)
  • Multivariate embeddings (Dixon et. al. 1999)
  • Convergent cross mapping (Sugihara et. al. 2012)
  • Multiview embedding (Ye and Sugihara 2016)

Installation

To install from CRAN rEDM:

install.packages(rEDM)

Using R devtools for latest development version:

install.packages("devtools")
devtools::install_github("SugiharaLab/rEDM")

Building from source:

git clone https://github.com/SugiharaLab/rEDM.git
cd rEDM
R CMD INSTALL .

Example

We begin by looking at annual time series of sunspots:

df = data.frame(yr = as.numeric(time(sunspot.year)), 
                 sunspot_count = as.numeric(sunspot.year))

plot(df$yr, df$sunspot_count, type = "l", 
     xlab = "year", ylab = "sunspots")

First, we use EmbedDimension() to determine the optimal embedding dimension, E:

library(rEDM)   # load the package
# If you're new to the rEDM package, please consult the tutorial:
# vignette("rEDM-tutorial")

E.opt = EmbedDimension( dataFrame = df,    # input data
                        lib     = "1 280", # portion of data to train
                        pred    = "1 280", # portion of data to predict
                        columns = "sunspot_count",
                        target  = "sunspot_count" )

E.opt
#     E    rho
# 1   1 0.7397
# 2   2 0.8930
# 3   3 0.9126
# 4   4 0.9133
# 5   5 0.9179
# 6   6 0.9146
# 7   7 0.9098
# 8   8 0.9065
# 9   9 0.8878
# 10 10 0.8773

Highest predictive skill is found between E = 3 and E = 6. Since we generally want a simpler model, if possible, we use E = 3 to forecast the last 1/3 of data based on training (attractor reconstruction) from the first 2/3.

simplex = Simplex( dataFrame = df, 
                   lib     = "1   190", # portion of data to train
                   pred    = "191 287", # portion of data to predict
                   columns = "sunspot_count",
                   target  = "sunspot_count",
                   E       = 3 )

plot( df$yr, df$sunspot_count, type = "l", lwd = 2,
      xlab = "year", ylab = "sunspots")
lines( simplex$yr, simplex$Predictions, col = "red", lwd = 2)
legend( 'topleft', legend = c( "Observed", "Predicted (year + 1)" ),
        fill = c( 'black', 'red' ), bty = 'n', cex = 1.3 )

Further Examples

Please see the package vignettes for more details:

browseVignettes("rEDM")

References

Sugihara G. and May R. 1990. Nonlinear forecasting as a way of distinguishing chaos from measurement error in time series. Nature, 344:734–741.

Sugihara G. 1994. Nonlinear forecasting for the classification of natural time series. Philosophical Transactions: Physical Sciences and Engineering, 348 (1688) : 477–495.

Dixon, P. A., M. Milicich, and G. Sugihara, 1999. Episodic fluctuations in larval supply. Science 283:1528–1530.

Sugihara G., May R., Ye H., Hsieh C., Deyle E., Fogarty M., Munch S., 2012. Detecting Causality in Complex Ecosystems. Science 338:496-500.

Ye H., and G. Sugihara, 2016. Information leverage in interconnected ecosystems: Overcoming the curse of dimensionality. Science 353:922–925.

Metadata

Version

1.15.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows