This repository contains the code and results for “Explanation of the influence of geomorphometric variables on the landform classification based on selected areas in Poland” article.
Reference geomorphological maps are available from the Head Office of Geodesy and Cartography in Poland and are licensed, therefore they are not publicly available.
- Open the
geomorph_classification.Rproj
project file in RStudio. - Generate geomorphometric variables for the entire country from digital elevation model (DEM) using
01_generate_variables.R
. This requires SAGA GIS and GDAL. - Prepare a dataset based on reference geomorphological maps and geomorphometric variables using
02_prepare_dataset.R
. - Scripts for train and validate machine learning models are defined in the following files:
03A_randomforest.R
,03B_xgboost.R
, and03C_lightgbm.R
. Please note that this process is very time-consuming. - Cross-validation for the best classifier (in this case XGBoost) for individual maps (morphogenetic zones) can be performed using
04_maps_crossvalidation.R
. - Prediction for the entire country can be made using
05_predict.R
. The result is three products, i.e. a landform classification map, a classification uncertainty map and a probability map of a specified landform. In addition, post-processing is performed including modal and sieve filters to smooth the output. - The accumulated local effects are calculated in the
06_ALE.R
for each sheet.
Note that the classes (landforms) numbering in XGBoost and LightGBM starts from 0, while in R from 1.
The results
directory contains the following files with the results of this study:
lightgbm.csv
- classification accuracy of the LightGBM model using hold-out validationrandomforest.csv
- classification accuracy of the Random Forest model using hold-out validationxgboost.csv
- classification accuracy of the XGBoost model using hold-out validationmaps_crossvalidation.csv
- classification accuracy of the XGBoost model for individual maps using cross-validationvariable_importance.csv
- significance of geomorphometric variables calculated for the XGBoost model
Additionally, the 1B_ALE_plots.pdf
file in the appendix
directory contains generated accumulated local effects (ALE) plots for all landforms.