Skip to contents

multiview embedding forecast

Usage

# S4 method for class 'sf'
multiview(
  data,
  columns,
  target,
  nvar,
  lib = NULL,
  pred = NULL,
  E = 3,
  tau = 1,
  k = E + 2,
  nb = NULL,
  top = NULL,
  threads = detectThreads(),
  trend.rm = TRUE
)

# S4 method for class 'SpatRaster'
multiview(
  data,
  columns,
  target,
  nvar,
  lib = NULL,
  pred = NULL,
  E = 3,
  tau = 1,
  k = E + 2,
  top = NULL,
  threads = detectThreads(),
  trend.rm = TRUE
)

Arguments

data

The observation data.

columns

Names of individual variables.

target

Name of target variable.

nvar

Number of variable combinations.

lib

(optional) Libraries indices.

pred

(optional) Predictions indices.

E

(optional) Dimensions of the embedding.

tau

(optional) Step of spatial lags.

k

(optional) Number of nearest neighbors used for prediction.

nb

(optional) The neighbours list.

top

(optional) Number of reconstructions used for MVE forecast.

threads

(optional) Number of threads.

trend.rm

(optional) Whether to remove the linear trend.

Value

A vector (when input is sf object) or matrix

References

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

Examples

columbus = sf::read_sf(system.file("case/columbus.gpkg", package="spEDM"))
# \donttest{
multiview(columbus,
          columns = c("inc","crime","open","plumb","discbd"),
          target = "hoval", nvar = 3)
#>  [1]  18.8646054  22.4869617  21.1550738  -1.1253460  -9.1007114  -2.7903615
#>  [7]  -7.6201012  -6.6613986  -8.7202885  16.2907046 -13.4100870   5.5617166
#> [13]  -4.6242104  -6.0215133 -12.1983725  -9.3303243  14.4441917   2.2055448
#> [19]  -4.3641292  -6.0871013 -11.5193470   2.6235111  13.7585733  -8.7467063
#> [25]  -9.7543853  -4.1516025   3.8137697 -18.6397054 -12.1462767 -12.0658493
#> [31]  10.9218398  19.4799373  -8.1531852  16.5727910   0.7379578   8.5333685
#> [37] -15.5058094 -17.8177107  23.9793164  27.1593848  18.1874514  -2.9723211
#> [43]  -2.8697946  -8.5016198   1.2200571   5.7208429  15.1875343   6.5063233
#> [49]   0.2310141
# }