confu_mat_optim: Function to find the cut-off threshold that optimizes the...

Description Usage Arguments Value

View source: R/confu_mat_optim.R

Description

The function finds out which is the best cut-off threshold that optimizes the confusion matrix based on Kappa or TSS

Usage

1
2
confu_mat_optim(sdm_raster, valData, longitude, latitude, pres_aus,
  optim_by = "kappa", th_range = c(0, 1), step = 0.005)

Arguments

valData

A data.frame or a matrix with validation data. The data must contain ongitude, latitude and a column of presences (1) and absences (0).

longitude

Column name of the longitude data

latitude

Column name of the latitude data

pres_aus

Column name of presences and absences. The presences have to represented by 1 and the absences with 0.

optim_by

The optimation should be by kappa (Kappa) metric or by tss (TSS) metric.

th_range

A vector with the minimum and max range of threshold values used in the searching process.

step

A numeric value representing the step size to be used in the searching process.

prediction

SDM predicition raster

Value

Returns a data.frame with the values of: confusion matrix, kappa, tss, prevalence, specificity, sensibility,correct classification rate (correct_class_rate), miss classification rate (miss_cla_rate), positive predictive power (posit_pre_pow), negative predictive power (nega_pre_pow), comission error (comission_error) omission error (omission_error).


luismurao/nichetoolbox documentation built on May 21, 2017, 3:42 p.m.