Commit ba94edfd authored by Daniela Rabe's avatar Daniela Rabe
Browse files

updated documentation and demo script

parent ad90ffb0
......@@ -12,7 +12,8 @@ saveSamplePoints(
ref_samples,
ref_switch,
num_models,
dummy_raster
dummy_raster,
overwrite = TRUE
)
}
\arguments{
......@@ -31,6 +32,8 @@ saveSamplePoints(
\item{num_models}{number of models used for the classification of a habitat}
\item{dummy_raster}{raster with probabilities for each pixel}
\item{overwrite}{overwrite file (default TRUE)}
}
\value{
ESRI shapefiles/GeoJSON with name: SamplePoints_step_classname.shp/SamplePoints_step_classname.geojson
......
......@@ -4,7 +4,13 @@
\alias{writeOutSamples}
\title{Selected Sample Collection for Habitat Types}
\usage{
writeOutSamples(in_path, step, class_name, output_format = c("shp", "geojson"))
writeOutSamples(
in_path,
step,
class_name,
overwrite = TRUE,
output_format = c("shp", "geojson")
)
}
\arguments{
\item{in_path}{file path (character) for results of habitat type sampling and probability mapping (same as outPath from function multi_Class_Sampling)}
......@@ -13,6 +19,8 @@ writeOutSamples(in_path, step, class_name, output_format = c("shp", "geojson"))
\item{class_name}{name (character) of habitat type for which samples should be selected}
\item{overwrite}{overwrite file (default TRUE)}
\item{output_format}{format (character) of output; whether shp (default) or geojson}
}
\value{
......
......@@ -91,10 +91,10 @@ col<-colorRampPalette(c("lightgrey","orange","yellow","limegreen","forestgreen")
######
##2.1.a##
multi_Class_Sampling(in.raster=timeseries_stack,init.samples=50,sample_type="regular",nb_models=200,nb_it=10,buffer=15,reference=ref,model="rf",mtry=10,last=FALSE,seed=3,init.seed="sample", outPath=outPath, step=1, classNames=classNames, n_classes=7, multiTest=1, RGB=plot_rgb, overwrite=TRUE, plot_on_browser=TRUE)
multi_Class_Sampling(in.raster=timeseries_stack,init.samples=50,sample_type="regular",nb_models=200,nb_it=10,buffer=15,reference=ref,model="rf",mtry=10,mod.error=0.02,last=FALSE,seed=3,init.seed="sample", outPath=outPath, step=1, classNames=classNames, n_classes=7, multiTest=1, RGB=plot_rgb,in.memory = TRUE, overwrite=TRUE, plot_on_browser=TRUE)
##2.1.b##
multi_Class_Sampling(in.raster=out.raster, init.samples=50, sample_type="regular", nb_models=300,nb_it=10, buffer=15, reference=out.reference, model="rf",mtry=10, last=F, seed=3, init.seed="sample", outPath=outPath, step=6, classNames=out.names, n_classes=7, multiTest=1, RGB=plot_rgb, overwrite=TRUE, plot_on_browser=TRUE)
multi_Class_Sampling(in.raster=out.raster, init.samples=50, sample_type="regular", nb_models=300,nb_it=10, buffer=15, reference=out.reference, model="rf",mtry=10, mod.error=0.02,last=F, seed=3, init.seed="sample", outPath=outPath, step=6, classNames=out.names, n_classes=7, multiTest=1, RGB=plot_rgb, in.memory = TRUE, overwrite=TRUE, plot_on_browser=TRUE)
########################################################################################
##3)##
......
......@@ -41,7 +41,8 @@ The demo shows how to classify 7 classes using a Sentinel 2 image.
buffer # distance (in m) for new sample collection around initial samples (depends on pixel size)
reference # table of reference spectra [data.frame]
model # which machine learning algorithm to use ("rf" random forest or "svm" support vector machine; suggest: rf)
area # SpatialPolygonsDataFrame from satellite time series stack extent
mod.error # threshold for model error until which iteration is being executed
in.memory # boolean for raster processing (memory = "TRUE", from disk = "FALSE")
mtry # number of predictor used at random forest splitting nodes (suggest: mtry << n predictors)
last # only true for one class classifier ("TRUE" or "FALSE"; suggest: "F")
seed # set seed for reproducible results (suggest: 3)
......
......@@ -212,6 +212,8 @@ HaSa::multi_Class_Sampling(
# recommended input: rf)
mtry = 10, # number of predictors used at random forest splitting nodes
# (recommended input: mtry << n predictors)
mod.error = 0.02, # threshold for model error until which iteration is being executed
in.memory = TRUE, # boolean for raster processing (memory = "TRUE", from disk = "FALSE")
last = F, # only FALSE for one class classifier (TRUE or FALSE;
# recommended input: FALSE) *See note 2
seed = 3, # set seed for reproducible results (recommended value: 3)
......
......@@ -328,6 +328,8 @@ HaSa::multi_Class_Sampling(
# recommended input: rf)
mtry = 10, # number of predictors used at random forest splitting nodes
# (recommended input: mtry << n predictors)
mod.error = 0.02, # threshold for model error until which iteration is being executed
in.memory = TRUE, # boolean for raster processing (memory = "TRUE", from disk = "FALSE")
last = F, # only FALSE for one class classifier (TRUE or FALSE;
# recommended input: FALSE) *See note 2
seed = 3, # set seed for reproducible results (recommended value: 3)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment