Description Usage Arguments Value
View source: R/confu_mat_optim.R
The function finds out which is the best cut-off threshold that optimizes the confusion matrix based on Kappa or TSS
1 2 | confu_mat_optim(sdm_raster, valData, longitude, latitude, pres_aus,
optim_by = "kappa", th_range = c(0, 1), step = 0.005)
|
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 |
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).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.