Trains a coarse-to-fine spatial linear model and optimizes the spatial scale (resolution) through progressive holdout validation.
cf_lm_hv(
y,
x = NULL,
coords,
train_rat = 0.75,
id_train = NULL,
alpha = 0.9,
kernel = "exp",
add_learn = "none"
)A list with the following elements:
Sum-of-squared error (SSE) for validation samples.
All the SSEs obtained in each learning step.
ID of training samples.
List of other outcomes, which are internally used.
Vector of response variables (N x 1).
Matrix of covariates (N x K).
Matrix of 2-dimensional point coordinates (N x 2).
Training sample ratio (default: 0.75). When N >= 1000, training samples are randomly selected. Otherwise, samples closest to the k-mean centers are used to stabilize the training.
Optional. If specified, the corresponding samples are used as training samples. Otherwise, training samples are selected at random (default).
Decay ratio of the kernel bandwidth in the coarse-to-fine training (default: 0.9).
Kernel type for modeling spatial dependence. `"exp"` for the exponential kernel (default) and `"gau"` for the Gaussian kernel.
If `"rf"`, random forest is additionally trained to capture non-linear patterns and/or higher-order interactions. Default is `"none"`, meaning no additional training.
Daisuke Murakami
Murakami, D., Comber, A., Yoshida, T., Tsutsumida, N., Brunsdon, C., & Nakaya, T. (2025). Coarse-to-fine spatial modeling: A scalable, machine-learning-compatible spatial model. *arXiv:2510.00968*.
cf_lm