Skip to main content
. 2018 Mar 22;18(4):944. doi: 10.3390/s18040944
Algorithm 1 Detection and mapping of vegetation alterations using spectral imagery and sets of features.
Required: orthorectified layers (bands) in reflectance I. Labelled regions from field assessments L.
Data Preparation
1: Load I data.
2: S Spectral indexes array from I.
3: X Features array [I, S].
Training
4: Y Labels array from dataset L.
5: D filtered dataset of features X with corresponding labelled pixel from Y.
6: Split D into training data DT and testing data DE.
7: Fit an XGBoost classifier C using DT.
8: R List of unique relevance values of processed features X from C.
9: for all values in R do
10: DTF Filtered underscored features from DT.
11:  Fit C using DTF.
12:  Append accuracy values from C into T.
13: end for
14: Fit C using the best features threshold from T.
15: Validate C with k-fold cross-validation from DTF.   ▹number of folds = 10
Prediction
16: P Predicted values for each sample in X.
17: Convert P array into a 2D orthorectified image.
18: O Displayed/overlayed image.
19: return O