auto_classify: Classify a preprocessed surface reflectance image

Description Usage Arguments Examples

View source: R/auto_classify.R

Description

First the image should be preprocessed using the auto_preprocess function. For Landsat CDR imagery, predictor layers can be generated using the auto_generate_predictors function.

Usage

1
2
auto_classify(predictor_file, train_shp, output_path, class_col = "Poly_Type",
  training = 0.6, overwrite = FALSE, notify = print)

Arguments

predictor_file

a Raster* of predictor layers output by the auto_preprocess function or path to an image stack in a format readable by the raster package.

train_shp

a file readable by readOGR with training polygons

output_path

the path to use for the output

class_col

the name of the column containing the response variable (for example the land cover type of each pixel)

training

indicator of which polygons to use in training. Can be: 1) a string giving the name of a column indicating whether each polygon is to be used in training (column equal to TRUE) or in testing (column equal to FALSE), or 2) a logical vector of length equal to length(polys), or 3) a number between 0 and 1 indicating the fraction of the polygons to be randomly selected for use in training.

overwrite

whether to overwrite existing files (otherwise an error will be raised)

notify

notifier to use (defaults to print function). See the notifyR package for one way of sending notifications from R. The notify function should accept a string as the only argument.

Examples

1
#TODO: Add example

azvoleff/teamlucc documentation built on June 4, 2017, 12:08 a.m.