[论文解读] The CAST package for training and assessment of spatial prediction models in R
CAST R 包提供具空间感知的机器学习工作流工具,包括新颖的交叉验证(NNDM/kNNDM)、可用性区域、特征选择和像素级不确定性,在南美洲植物物种丰富度上有所演示。
One key task in environmental science is to map environmental variables continuously in space or even in space and time. Machine learning algorithms are frequently used to learn from local field observations to make spatial predictions by estimating the value of the variable of interest in places where it has not been measured. However, the application of machine learning strategies for spatial mapping involves additional challenges compared to "non-spatial" prediction tasks that often originate from spatial autocorrelation and from training data that are not independent and identically distributed. In the past few years, we developed a number of methods to support the application of machine learning for spatial data which involves the development of suitable cross-validation strategies for performance assessment and model selection, spatial feature selection, and methods to assess the area of applicability of the trained models. The intention of the CAST package is to support the application of machine learning strategies for predictive mapping by implementing such methods and making them available for easy integration into modelling workflows. Here we introduce the CAST package and its core functionalities. At the case study of mapping plant species richness, we will go through the different steps of the modelling workflow and show how CAST can be used to support more reliable spatial predictions.
研究动机与目标
- 动机:由于空间自相关和非独立同分布的训练数据,将机器学习应用于空间预测任务所面临的挑战。
- 将 CAST 作为一个工具包,整合空间交叉验证、特征选择和可用性评估到 R 的 ML 工作流中。
- 演示一个使用 CAST 功能来预测南美植物物种丰富度的实际工作流。
- 展示如何量化预测不确定性并划定模型预测有效的区域。
提出的方法
- 介绍最近邻距离匹配(NNDM)及其 k-fold 变体(kNNDM),作为面向预测的交叉验证策略,通过将训练-测试最近邻距离的分布与预测-训练距离进行匹配,从而模拟预测条件。
- 提供可视化工具(geodist)来比较地理距离并评估交叉验证折叠的代表性。
- 实现空间特征选择(前向特征选择),以减少过拟合并提升空间预测性能(CAST::ffs)。
- 在预测器空间中使用不相似性指数(DI)定义并计算适用区域(AOA),可选的局部数据点密度(LPD)用于标记外推风险(CAST::aoa, CAST::trainDI)。
- 通过由 DI 和 AOA 指导的误差轮廓(CAST::errorProfiles)估计像素级预测性能,从而实现不确定性映射。
- 演示与常见 ML 工作流(caret、ranger)以及与 terra 和 sf 对栅格/向量数据的兼容性集成。
实验结果
研究问题
- RQ1预测导向的交叉验证策略(NNDM/kNNDM)如何影响时空模型的真实地图精度估计?
- RQ2空间特征选择是否能通过减少过拟合来改善预测制图,并维持或提高空间精度?
- RQ3如何划定并利用可用性区域,以避免在未被训练数据覆盖的区域做出不可靠的预测?
- RQ4如何利用预测器空间的不相似性和数据密度量化并传达像素级不确定性?
主要发现
| 模型 | 交叉验证 | RMSE | R2 | 预测变量 |
|---|---|---|---|---|
| Full | Random k-fold | 24.16 | 0.71 | 11 |
| Full | kNNDM | 33.34 | 0.47 | 11 |
| Simplified | kNNDM | 31.97 | 0.52 | 5 |
| Simplified | Random k-fold | 24.31 | 0.71 | 5* |
- 与随机 k-fold CV 相比,kNNDM 交叉验证给出更真实、通常更差的验证指标,因为它测试更难、距离更远的预测,反映现实世界的外推条件。
- 在合适的空间 CV 策略下,前向特征选择可在比完整模型更少的预测变量数量下降低 RMSE 并提升 R2。
- 适用区域(AOA)基于预测器空间中与训练数据的不相似性指数,识别模型预测可靠的区域;AOA 外的预测将被屏蔽。
- 利用误差轮廓进行像素级性能估计,将交叉验证性能与局部预测器空间不相似性联系起来,实现空间上显式的不确定性映射。
- 在南美植物丰富度示例中,使用 kNNDM 的简化模型仅有 5 个预测变量,其 RMSE 为 31.97,R2 为 0.52;而使用随机 CV 的完整模型的 RMSE 为 24.16,R2 为 0.71(n=table entries),这说明 CV 选择对报告的性能的影响。
- CAST 工作流整合了交叉验证、特征选择、AOA 和不确定性评估,以产生更可靠的时空预测。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。