This function allows to calibrate supervised classification in satellite images through various algorithms and using approaches such as Set-Approach, Leave-One-Out Cross-Validation (LOOCV), Cross-Validation (k-fold) and Monte Carlo Cross-Validation (MCCV).

calmla(
  img,
  endm,
  model = c("svm", "randomForest", "naiveBayes", "LMT", "nnet", "knn"),
  training_split = 50,
  approach = "Set-Approach",
  k = 10,
  iter = 10,
  verbose = FALSE,
  ...
)

Arguments

img

RasterStack or RasterBrick.

endm

Signatures. Geometry type, Points or Polygons (typically shapefile), containing the training data.

model

Model to use. It can be Support Vector Machine (svm) like model = 'svm', Random Forest (randomForest) like model = 'randomForest', Naive Bayes (naiveBayes) like model = 'naiveBayes', Decision Tree (train) like model = 'LMT', Neural Networks (nnet) like model = 'nnet', K-nearest Neighbors (knn3) like model = 'knn'.

training_split

For splitting samples into two subsets, i.e. training data and for testing data.

approach

Calibration method. There are for options: Simple training and testing (Set-Approach) like approach == 'Set-Approach', Leave One Out Cross-Validation (LOOCV) like approach == 'LOOCV', Cross-Validation (K-fold) like approach == 'k-fold' and Monte Carlo Cross-Validation (MCCV) like approach == 'MCCV'.

k

Number of groups for splitting samples. It must be used only with the Cross-Validation (K-fold) approach. Default is k = 10.

iter

Number of iterations, i.e number of times the analysis is executed.

verbose

This parameter is Logical. It Prints progress messages during execution.

...

Parameters to be passed to a machine learning algorithm. Please see svm, randomForest, naiveBayes, train, nnet and knn3

Details

If the "Set-Approach" method is being used, it is not necessary to use parameter k. k only can be used when the Cross-Validation (k-fold) method is used. On the other hand, to create groups in Cross-Validation, the createFolds function of "caret" is used. See createFolds for more details. In addition, to generate random splits in Monte Carlos Cross-Validation the generate.split function of the "WilcoxCV" package was used. Please see generate.split for more details.

Note

At the moment, only one calibration approach can be used.

References

Gareth James, Daniela Witten, Trevor Hastie, Robert Tibshirani. (2013). An introduction to statistical learning : with applications in R. New York: Springer.

Thomas G. Dietterich. (2006).Approximate Statistical Tests for Comparing Supervised Classification Learning Algorithms. The MIT Press Journal, 10 (7).

Mountrakis, G., Im, J., Ogole, C. (2011). Support vector machines in remote sensing: A review. ISPRS Journal of Photogrammetry and Remote Sensing, 66, 247-259.

Belgiu, M., Dragut., L. (2016). Random Forest in Remote Sensing: A Review of Applications and Future Directions. ISPRS Journal of Photogrammetry and Remote Sensing, 114, 24-31.

Maxwell, A.E., Warner, T.A., Fang, F. (2018). Implementation of machine-learning classification in remote sensing: an applied review. International Journal of Remote Sensing, 29(9), 2784-2817.

Pradhan, R., Ghose, M.K., Jeyaram, A. (2010). Land Cover Classification of Remotely Sensed Satellite Data using Bayesian and Hybrid classifier. International Journal of Computer Applications, 7(11).

Holloway, J., Mengersen, K. (2018). Statistical Machine Learning Methods and Remote Sensing for Sustainable Development Goals: A Review. Remote Sensing, 10(9), 1365.

Examples

if (FALSE) {
library(ForesToolboxRS)
library(raster)
library(caret)

# Load the datasets
data(img_l8)
data(endm)

# Support Vector Machine and Random Forest Classifiers
# Calibrating using "Set-Approach"
cal_ml <- calmla(
  img = img_l8, endm = endm, model = c("svm", "randomForest"), training_split = 80,
  approach = "Set-Approach", iter = 10
)
}