https://github.com/kadyb/geomorph_classification
Automatic gemorphological classification based on Digital Geomorphological Maps of Poland
https://github.com/kadyb/geomorph_classification
classification geomorphology geomorphometry poland r spatial
Last synced: 27 days ago
JSON representation
Automatic gemorphological classification based on Digital Geomorphological Maps of Poland
- Host: GitHub
- URL: https://github.com/kadyb/geomorph_classification
- Owner: kadyb
- License: mit
- Created: 2023-02-19T13:16:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-09T14:23:41.000Z (over 1 year ago)
- Last Synced: 2025-03-15T18:50:17.053Z (7 months ago)
- Topics: classification, geomorphology, geomorphometry, poland, r, spatial
- Language: R
- Homepage:
- Size: 14.9 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gomorphological classification
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](https://www.nature.com/articles/s41598-024-56066-6)” 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.
## Reproduction
1. Open the `geomorph_classification.Rproj` project file in [RStudio](https://rstudio.com/).
2. Generate geomorphometric variables for the entire country from digital elevation model (DEM) using `01_generate_variables.R`. This requires [SAGA GIS](https://saga-gis.sourceforge.io/en/index.html) and [GDAL](https://gdal.org/).
3. Prepare a dataset based on reference geomorphological maps and geomorphometric variables using `02_prepare_dataset.R`.
4. Scripts for train and validate machine learning models are defined in the following files: `03A_randomforest.R`, `03B_xgboost.R`, and `03C_lightgbm.R`. Please note that this process is very time-consuming.
5. Cross-validation for the best classifier (in this case XGBoost) for individual maps (morphogenetic zones) can be performed using `04_maps_crossvalidation.R`.
6. 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.
7. 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.
## Results
The `results` directory contains the following files with the results of this study:
- `lightgbm.csv` - classification accuracy of the LightGBM model using hold-out validation
- `randomforest.csv` - classification accuracy of the Random Forest model using hold-out validation
- `xgboost.csv` - classification accuracy of the XGBoost model using hold-out validation
- `maps_crossvalidation.csv` - classification accuracy of the XGBoost model for individual maps using cross-validation
- `variable_importance.csv` - significance of geomorphometric variables calculated for the XGBoost modelAdditionally, the `1B_ALE_plots.pdf` file in the `appendix` directory contains generated accumulated local effects (ALE) plots for all landforms.