smap: smap forecast

smapR Documentation

smap forecast

Description

smap forecast

Usage

## S4 method for signature 'sf'
smap(
  data,
  target,
  lib = NULL,
  pred = NULL,
  E = 3,
  tau = 1,
  k = E + 2,
  theta = c(0, 1e-04, 3e-04, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 0.5, 0.75, 1, 1.5, 2, 3,
    4, 6, 8),
  nb = NULL,
  threads = detectThreads(),
  trend.rm = TRUE
)

## S4 method for signature 'SpatRaster'
smap(
  data,
  target,
  lib = NULL,
  pred = NULL,
  E = 3,
  tau = 1,
  k = E + 2,
  theta = c(0, 1e-04, 3e-04, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 0.5, 0.75, 1, 1.5, 2, 3,
    4, 6, 8),
  threads = detectThreads(),
  trend.rm = TRUE
)

Arguments

data

The observation data.

target

Name of target variable.

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.

theta

(optional) Weighting parameter for distances.

nb

(optional) The neighbours list.

threads

(optional) Number of threads.

trend.rm

(optional) Whether to remove the linear trend.

Value

A list

xmap

self mapping prediction results

varname

name of target variable

Examples

columbus = sf::read_sf(system.file("shapes/columbus.gpkg", package="spData"))

smap(columbus,target = "INC")


spEDM documentation built on April 4, 2025, 2:41 a.m.