View source: R/SOptim_PrepFullDataset.R
prepareCalData | R Documentation |
An auxiliary wrapper function used to generate train/evaluation data and calculating feature statistics by
image segment. The output object can then be used in calibrateClassifier
function
for training a classification algorithm (with option runFullCalibration=TRUE
).
prepareCalData(
rstSegm,
trainData,
rstFeatures,
thresh = 0.5,
funs = c("mean", "sd"),
minImgSegm = 30,
bylayer = FALSE,
tiles = NULL,
verbose = TRUE,
progressBar = FALSE
)
rstSegm |
A path or a |
trainData |
Input train data used for classification. The input can be a |
rstFeatures |
A string defining the path to the raster features or a
|
thresh |
A threshold value defining the minimum proportion of the segment ]0, 1] that
must be covered by a certain class to be considered as a training case. This threshold will
only apply if |
funs |
A character vector with the name(s) of the functions used to aggregate
data (default: |
minImgSegm |
Minimum number of image segments/objects necessary to generate train data. |
bylayer |
Calculate statistics layer by layer instead of all at once? (slightly increases computation time but spares memory load; default: FALSE). |
tiles |
Number of times that the image will be divided along the x and y axes. This means that
the original raster data will be split into a number of blocks equal to tiles^2 (e.g., if
|
verbose |
Print progress messages? (default: TRUE) |
progressBar |
Boolean. Show progress bar? (default: FALSE). |
An object of class SOptim.CalData
containing two elements:
calData - A data frame object containing calibration data for training and evaluating a classifier algorithm. The first column (named "SID") contains the ID of each segment, and the second column (named "train") holds the segment class (or label). The following n columns hold the classification features for training;
classifFeatData - A data frame containing all segments and features from inputs. The first column (named "SID") holds the unique identifier for each image segment. The following n columns are used as classification features. Typically this data set is used for predicting the target class after calibrating a certain classifier algorithm.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.