Commit 8d93fd78 authored by Romulo Pereira Goncalves's avatar Romulo Pereira Goncalves
Browse files

Add documentation files

parent 1863d8b6
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Class_Habitat.r
\docType{class}
\name{Habitat-class}
\alias{Habitat-class}
\alias{Habitat}
\title{Habitat Class}
\value{
a Habitat Class
}
\description{
Creates a Habitat Class
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clip.r
\name{clip}
\alias{clip}
\title{Clip}
\usage{
clip(raster, shape)
}
\arguments{
\item{shape}{}
}
\value{
a raster object
}
\description{
Clips a raster object
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_interactive.r
\name{iplot}
\alias{iplot}
\title{Plot Habitat Types}
\usage{
iplot(x, y, HaTy, r, g, b, acc, outPath)
}
\arguments{
\item{x}{probability image (*rasterObject)}
\item{y}{RGB image (*rasterObject)}
\item{HaTy}{name of habitat type (character)}
\item{r}{red channel (integer)}
\item{g}{green channel (integer)}
\item{b}{blue channel (integer)}
\item{acc}{predictive accuracy (integer)}
\item{outPath}{file path for '.html export (character)}
}
\description{
A quick wrapper to produce an interactive raster map of habitat type probability in a web browser using leaflet
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_opt.r
\name{model_opt_r}
\alias{model_opt_r}
\title{Perform Habitat Sampling and Probability Mapping}
\usage{
model_opt_r(
k,
raster,
sample_type,
buffer,
model,
area,
seed,
n,
sample_size,
n_channel,
seed2,
mtry,
pbtn1,
pbtn2,
ras_vx,
max_samples_per_class
)
}
\arguments{
\item{k}{Iteration value for the models.}
\item{raster}{satellite time series stack (rasterBrickObject) or just any type of image (*rasterObject)}
\item{sample_type}{distribution of spatial locations c("random","regular")}
\item{buffer}{distance (in m) for new sample collection around initial samples (depends on pixel size)}
\item{model}{which machine learning classifier to use c("rf", "svm") for random forest or support vector machine implementation}
\item{area}{extent where the the classification is happening}
\item{seed}{set seed for reproducible results}
\item{n}{number of iterations for model accuracy}
\item{sample_size}{number of spatial locations}
\item{n_channel}{number of channels}
\item{seed2}{spatial points sample}
\item{mtry}{number of predictor used at random forest splitting nodes (mtry << n predictors)}
\item{pbtn1}{matrix for points}
\item{pbtn2}{matrix for points}
\item{ras_vx}{velox raster}
\item{max_samples_per_class}{maximum number of samples per class}
}
\value{
a list with 4 elements:
\enumerate{
\item k To identify the used model \cr
\item model The model - mmax \cr
\item points_list List of points used part of the sample. \cr
\item oobe The accuracy achieved by the model \cr
}
}
\description{
This function finds the best model (mmax) for a set of sampled points.
}
\keyword{internal}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/inner_procedure.r
\name{sample_nb}
\alias{sample_nb}
\title{Perform Habitat Sampling and Probability Mapping}
\usage{
sample_nb(
raster,
nb_samples,
sample_type,
nb_mean,
nb_it,
buffer,
reference,
model,
area,
mtry,
last,
seed,
init.seed,
parallel_mode
)
}
\arguments{
\item{raster}{satellite time series stack (rasterBrickObject) or just any type of image (*rasterObject)}
\item{nb_samples}{number of spatial locations}
\item{sample_type}{distribution of spatial locations c("random","regular")}
\item{nb_mean}{number of iterations for model accuracy}
\item{buffer}{distance (in m) for new sample collection around initial samples (depends on pixel size)}
\item{reference}{reference spectra either SpatialPointsDataFrame (shape file) or data.frame with lines = classes, column = predictors]}
\item{model}{which machine learning classifier to use c("rf", "svm") for random forest or suppurt vector machine implementation}
\item{area}{extent where the the classification is happening}
\item{mtry}{number of predictor used at random forest splitting nodes (mtry << n predictors)}
\item{last}{only true for one class classifier c("FALSE", TRUE")}
\item{seed}{set seed for reproducable results}
\item{init.seed}{"sample" for new or use run1@seeds to reproduce previous steps}
\item{parallel_mode}{run loops using all available cores}
\item{nb_models}{number of models (independent classifiers) to collect}
}
\value{
a list with 3 elements:
\enumerate{
\item An index
\item Accuracy vector
\item A vector with a Habitat objects, each consisting of 7 slots: \cr
run1@models - list of selected classifiers \cr
run1@ref_samples - list of SpatialPointsDataFrames with same length as run1@models holding reference labels \link{1,2} for each selected model \cr
run1@switch - vector of length run1@models indicating if target class equals 2, if not NA the labels need to be switched \cr
run1@layer - raster map of habitat type probability \cr
run1@mod_all - list of all classifiers (equals nb_models) \cr
run1@class_ind - vector of predictive distance measure for all habitats \cr
run1@seeds - vector of seeds for random sampling \cr
all files are saved with step number, the *.tif file is additionally saved with class names
}
}
\description{
This is the function that performs: initiate sampling and model building
}
\keyword{internal}
Supports Markdown
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