sick_tree_errors: Sick tree error calculator

Description Usage Arguments Value

View source: R/sick_tree_errors.R

Description

Calculate errors in automated detection of declining trees using visual inspection data as reference

Usage

1
2
3
sick_tree_errors(r_pred_dir, tile = "ALL", thresh = NA, vuln_classes, pnts,
  radius, field_name, abs_samp = 100, parallel = F, nWorkers = 4,
  data_outp_dir = NULL)

Arguments

r_pred_dir

A directory where binary .tifs predicting presence as 1 and absence as 0 can be found for multiple tiles

tile

Character vector. Names of tile(s) to run. 'ALL will run all tiles in r_pred_dir. Default is 'ALL'

thresh

If the image data is non-binary, the value threhs can be set to split the image values between presence (> thresh) and absence (<= thresh). Default is NA, in which case the image values are assumed binary.

vuln_classes

A list of the classes you want to model. The list can contain one or more vectors. Each vector represents a seperate vegetation class and response variable for the model and the vector elements are synonyms used to describe that class. The fist place in each vector will be used in the output name used to store the calibrated model, so it should not contain spaces. The other places should appear as attributes in the field 'field_name' of pnts.

pnts

SpatialPointsDataFrame of which one field contains the vuln_classes

radius

The radius within which a presence point must be found for it to be considered 'correct'

field_name

The field in pnts that contains the vuln_classes

abs_samp

How many 'absence' pixels should be randomly selected from each tile to evaluate the absences? Default is 100.

parallel

Should the code be run in parallel using the doParallel package? Default is FALSE.

nWorkers

If running the ocde in parallel, how many workers should be used? Default is 4.

data_outp_dir

The folder and filename prefix to save the sampled data to. No data is saved is data_outp_dir is NULL. Default is NULL.

Value

A data frame with commission and ommission errors and sample sizes of presence and absence


pieterbeck/CanHeMonR documentation built on May 25, 2019, 7:11 a.m.