CAST: Caret Applications for Spatio-Temporal models

Supporting functionality to run 'caret' with spatial or spatial-temporal data. 'caret' is a frequently used package for model training and prediction using machine learning. CAST includes functions to improve spatial or spatial-temporal modelling tasks using 'caret'. To decrease spatial overfitting and to improve model performances, the package implements a forward feature selection that selects suitable predictor variables in view to their contribution to spatial or spatio-temporal model performance. CAST further includes functionality to estimate the (spatial) area of applicability of prediction models.

Note: The developer version of CAST can be found on https://github.com/HannaMeyer/CAST. The CRAN Version can be found on https://CRAN.R-project.org/package=CAST

The figure shows a very simple workflow for a spatial prediction mapping workflow, indicating which function in CAST can be used in the different steps to support the spatial prediction.

Package Website

https://hannameyer.github.io/CAST/

Tutorials

Scientific documentation of the methods

Spatial cross-validation

Spatial variable selection

Area of applicability

Applications and use cases

FAQ: Why is there a horse in the logo?

You might be wondering why a spatial modeling package is represented by a horse! Although the horse in the logo looks suspiciously like the maintainer's horse, that's purely coincidental!

The real reason for the horse is the famous "Clever Hans" effect. Hans was a horse who became famous for his ability to do math, but it turned out he wasn't actually calculating; instead, he was simply reading the subtle body language of his owner. He hadn't learned any mathematical skills, as it was much easier to provide the correct answer (and probably earn cookies) by reading these cues.

In spatial data science, we face a similar challenge: models often take “shortcuts” by learning patterns in the data that allow them to reproduce the right answer without understanding the underlying process. In these cases, the model fails to learn the scientifically meaningful relationships required for a reliable and transferable model.

CAST is designed to help you detect this. It allows you to test for the spatial transferability of your model (via prediction domain adaptive validation) and ensures your model has learned the right relationships (via spatial variable selection), hence stopping it from being a "Clever Hans" and ensuring that your predictor variables are truly contributing to the spatial model's performance.