Problem with spatial autocorrelation measurement for predictor rasters in blockCV::cv_spatial_autocor()
I’m encountering problems with the cv_spatial_autocor
function from the blockCV
package. This function is used to measure spatial autocorrelation in spatial response data or predictor raster files. It also helps in choosing the block size for creating train and test folds in k-fold and leave-one-out cross-validation.
How to calculate R2 from cross-validation of a PLSR-model (r package plsRglm)
I want to calculate the coefficient of determination for the cross validation of my plsr-model by hand, using Residual Sum of Squares (RSS) and Total Sum of Squares (TSS). How can I extract the predicted values from the cv-model to do this?