R/compute.threshold.FPF.pooledROC.emp.R

Defines functions compute.threshold.FPF.pooledROC.emp

compute.threshold.FPF.pooledROC.emp <-
function(object, FPF = 0.5, ci.level = 0.95, parallel = c("no", "multicore", "snow"), ncpus = 1, cl = NULL) {
	if(class(object)[1] != "pooledROC.emp") {
		stop(paste0("This function can not be used for this object class: ", class(object)[1]))
	}
	
	F1emp <- ecdf(object$marker$d[!object$missing.ind$d])
	thresholds <- quantile(object$marker$h[!object$missing.ind$h], 1 - FPF, type = 1)
	TPF <- 1 - F1emp(thresholds)
	
	res <- list()
	res$thresholds <- thresholds
	res$FPF <- FPF
	res$TPF <- TPF
	res

}

Try the ROCnReg package in your browser

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

ROCnReg documentation built on March 31, 2023, 5:42 p.m.