View source: R/decorrelate_data.R
| decorrelate_data | R Documentation |
Apply the spatial decorrelation transformation to a data object. This object contains the transformed explanatory and response variables which can be used to fit a machine learning model. This object also contains information needed to decorrelate prediction data.
decorrelate_data(
formula,
data,
spcov_params,
xcoord,
ycoord,
randcov_params,
partition_factor,
ordering,
local,
...
)
formula |
A two-sided linear formula describing the fixed effect structure
of the model, with the response to the left of the |
data |
A data frame or |
spcov_params |
An object from |
xcoord |
The name of the column in |
ycoord |
The name of the column in |
randcov_params |
An object from |
partition_factor |
A one-sided linear formula with a single term specifying the partition factor. The partition factor assumes observations from different levels of the partition factor are uncorrelated. |
ordering |
The data ordering applied. Available options
include |
local |
A optional logical or list controlling the big data approximation.
If omitted,
When |
... |
Other arguments to the functions called by |
The spatial decorrelation transformation is a preprocessing transformation
that reduces the impacts of spatial dependence (i.e., covariance, correlation)
on machine learning models. See decorrelate() and Heaton et al., 2025 for more details.
A list with many elements that store information about the fitted model object. Importantly, the list contains the following elements:
X: The original fixed effects design matrix (of explanatory variables)
y: The original response variable
tX: The spatially decorrelated transformed fixed effects design matrix
ty: The spatially decorrelated transformed response variable
Matthew J. Heaton, Andrew Millane, and Jake S. Rhodes. 2025. A Scalable Spatial Decorrelation Preprocessing Approach for Machine and Deep Learning. Journal of Data Science. 1-15, DOI 10.6339/25-JDS1210
decorrelate() spcov_params() randcov_params()
params <- spcov_params("exponential", de = 1, ie = 0.2, range = 1e5)
decorr <- decorrelate_data(log_cond ~ temp, data = lake, spcov_params = params)
head(cbind(decorr$X, decorr$tX))
head(cbind(decorr$y, decorr$ty))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.