Skip to content
FLFgit edited this page Oct 14, 2021 · 4 revisions

Function for [Clas]s-specific [P]redictions

Source

https://github.com/FLFgit/ScaleP/blob/master/functions/fClasP.R

Parameter

  • RU.DIR -> directory containing reference unit (RU) file
  • RU.SHP -> name of reference unit shape file
  • SAMPLE.DIR -> directory containing sample data set
  • SAMPLE.SHP -> name of sample data set
  • PART -> proportion of training and test data set [0...1]
  • OUT.DIR -> directory containing resulting files
  • EPSG -> EPSG code of all data
  • T.CLASS -> column name of target class in SAMPLE.SHP
  • PM -> prefix of explaning attributes, which should be considered
  • UPTRAIN=TRUE -> option: UPTRAIN function for balancing of unequally distributed classes is TRUE
  • EXPORT=FALSE -> option: export of shape file with explaining parameters and prediction result

Result

  • [RU.SHP]-[SAMPLE.SHP]_[T.PM]_MODEL-[M.TRAIN]_part[PART*100]_train.shp -> shape file of training data set
  • [RU.SHP]-[SAMPLE.SHP]_[T.PM]_MODEL-[M.TRAIN]_part[PART*100]_test.shp -> shape file of test data set
  • [RU.SHP]-[SAMPLE.SHP]_[T.PM]_MODEL-[M.TRAIN]_BP.pdf -> barplot of target classes based on training and test data sets
  • [RU.SHP]-[SAMPLE.SHP]_[T.PM]_MODEL-[M.TRAIN]_VarImp.csv -> variable-specific variable importance
  • [RU.SHP]-[SAMPLE.SHP]_[T.PM]_MODEL-[M.TRAIN]_CV.csv -> global accuracy metrics based on cross validation representing internal model performance
  • [RU.SHP]-[SAMPLE.SHP]_[T.PM]_MODEL-[M.TRAIN]_CM.csv -> confusion matrix based on prediction to the training data set
  • [RU.SHP]-[SAMPLE.SHP]_[T.PM]_MODEL-[M.TRAIN]_AM.csv -> accuracy metrics based on prediction to the training data set by applying function fEvaluate.
  • [RU.SHP]-[SAMPLE.SHP]_[T.PM]_MODEL-[M.TRAIN]_BP.pdf -> barplot of predicted classes
  • [RU.SHP]-[SAMPLE.SHP]_[T.PM]_MODEL-[M.TRAIN]_part[PART*100].shp -> optional: shape file with explaining parameters and prediction result (column [T.CLASS]_SIM)

Clone this wiki locally