User Tools

Site Tools


courses:msc:msc-phygeo-remote-sensing:worksheets:rs-ws-09-3

W09-3: Model training

Once the new training data set is ready, compute a pixel-based land-cover classification using some kind of machine learning algorithm.

After completing this worksheet you should be able to perform a straight forward machine learning model training workflow using the gpm package.

Things you need for this worksheet

  • R — the interpreter can be installed on any operation system. For Linux, you should use the r-cran packages supplied for your Linux distribution. If you use Ubuntu, this is one of many starting points. If you use Windows, you could install R from the official CRAN web page.

  • R Studio — we recommend to use R Studio for (interactive) programming with R. You can download R Studio from the official web page.

  • Git environment for your operating system. For Windows users with little experience on the command line we recommend GitHub Windows.

  • your deliveries from W09-2: Training dataset

Learning log assignments

8-) As always, please add these entries to your today's learning log in the beginning of your Rmd file you will use to push to your GitHub classroom.

  • Favorite aspect of the session (if any)
  • Superfluous aspect of the session (if any)
  • Eureka effect (if any)
  • Links to what I've learned so far (if any)
  • Questions (if any)

As today's special, please complete the following assignment:

:-\ Please compute a sufficiently trained random forest model for predicting your land-cover classes using the training data set derived from. Use the gpm package for that. Once your model has been finished, compute the Kappa index of agreement and add it as a comment in the last line of your script.

:-\ Please update (i.e. commit) your R script publish (i.e. push) it to the GitHub classroom.

Installation of R packages from GitHub

If you want to install a package directly from GitHub, type:

devtools::install_github(“path-to-package”)

For example: devtools::install_github(“environmentalinformatics-marburg/gpm”)

GPM

The gpm package is work in progress. However, the major functionality required for this task is available. In order to ease things up, the following script already shows the workflow required. Have a look at E07-1: Land-cover classification with R.

The major steps required are:

  • Compile model training dataset (task of W09-2)
  • gpm package: Remove highly correlated predictor variables
  • gpm package: Create multiple samples
  • gpm package: Split samples in training and testing
  • gpm package: Train model
  • gpm package: Compute evaluation statistics (e.g. Kappa)

See the script on GitHub.

courses/msc/msc-phygeo-remote-sensing/worksheets/rs-ws-09-3.txt · Last modified: 2017/01/27 09:22 by tnauss