R/ROC.R

# Author: Ali Santacruz
# Date :  April 2015
# Version 1.0
# Licence GPL v3


if (!isGeneric("ROC")) {
	setGeneric("ROC", function(index, boolean, ...)
		standardGeneric("ROC"))
}	

setMethod("ROC", signature = c('numeric', 'numeric'), 
          definition = function(index, boolean, mask = NULL, nthres = NULL, thres = NULL, NAval = 0, progress = FALSE)  {
            tocd <- .ROCnosp(index, boolean, mask = mask, nthres = nthres, thres = thres, NAval = NAval, progress = progress)
            return(tocd)
          }
          )

setMethod("ROC", signature = c('SpatRaster', 'SpatRaster'), 
          definition = function(index, boolean, mask = NULL, nthres = NULL, thres = NULL, NAval = 0, progress = FALSE)  {
            tocd <- .ROCsp(index, boolean, mask = mask, nthres = nthres, thres = thres, NAval = NAval, progress = progress)
            return(tocd)
          }
          )
	

Try the TOC package in your browser

Any scripts or data that you put into this service are public.

TOC documentation built on Feb. 16, 2023, 7:10 p.m.