The video presenting the content for these slides and all the related materials including source code and sample data can be downloaded from this link: http://amsantac.co/blog/en/2016/10/22/model-stacking-classification-r.html.
Model ensembling comprises a set of methods that aims to increase accuracy by combining the predictions of multiple models together.
Ensemble methods can be categorized based on their approach for combining classifiers: one approach is to use similar classifiers and to combine them together using techniques such as bagging, boosting or random forests. A second approach is to combine different classifiers using model stacking.
In this presentation I provide an example of model stacking applied to the classification of a Landsat image.
3. Modelstackingexample:Imageclassification
Let's import the image to be classified (Landsat 7 ETM+, path 7 row 57, taken on 20000316
converted to surface reflectance and provided by USGS) and the shapefile with training data:
library(rgdal)
library(raster)
library(caret)
set.seed(123)
img <‐ brick(stack(as.list(list.files("data/", "sr_band", full.names = TRUE))))
names(img) <‐ c(paste0("B", 1:5, coll = ""), "B7")
trainData <‐ shapefile("data/training_15.shp")
responseCol <‐ "class"
3/14