View source: R/recorrelate_newdata.R
| recorrelate_newdata | R Documentation |
Recorrelate machine learning predictions according to a spatial decorrelation transformation.
recorrelate_newdata(object, ty_newdata)
object |
A |
ty_newdata |
Predictions from the machine learning model trained on the spatially decorrelated data and applied to spatially decorrelated newdata. |
A vector of predictions
params <- spcov_params("exponential", de = 1, ie = 0.2, range = 1e5)
decorr <- decorrelate_data(log_cond ~ temp, data = lake, spcov_params = params)
fit <- ranger::ranger(x = decorr$tX, y = decorr$ty)
decorr_newdata <- decorrelate_newdata(decorr, newdata = lake_preds)
rfpreds <- predict(fit, data = decorr_newdata$tX_newdata)$predictions
recorrelate_newdata(decorr_newdata, rfpreds)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.