WSA-RF: Random Forest Models for Water-Stable Aggregate Prediction
WSA-RF is a Python implementation of Random Forest modelling for predicting water-stable aggregates from user-defined soil properties and predictor combinations. It was prepared in connection with the manuscript “Beyond Soil Texture: Improving Water-Stable Aggregate Prediction with Organic Matter and Carbonate Information.” The code includes baseline Random Forest regression, Bayesian hyperparameter optimization using BayesSearchCV, grid search using GridSearchCV, and a randomized perturbation search retaining the original SPSA-RF model label. Users supply training and testing datasets, the target variable, predictor combinations, and optional output destinations without predefined local paths or filenames. Outputs include fitted models, training and testing predictions, performance metrics, selected hyperparameters, optimization histories where applicable, and optional Excel workbooks and a Word summary. Evaluation metrics include MSE, RMSE, NRMSE, MAE, R², MAPE, MBE, NSE, and Willmott’s index of agreement.
Authors
- Saeed Samadianfard (ORCID: https://orcid.org/0000-0002-6876-7182)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-10-29
- DOI
- https://doi.org/10.5281/zenodo.23758553
- Primary Topic
- Soil Geostatistics and Mapping
- Type
- article
- Field-Weighted Citation Impact
- 0.00