threshold: threshold() function

Description Usage Details

View source: R/threshold.r

Description

function to search for threshold

Usage

1
threshold(prob, true, resolution = 1000)

Details

input: prob: vector/array/data.frame...: containing the predicted probabilities from 'predict' function true: vector/array/data.frame...: indicating the true label; has to have the same length as prob resolution: int: search resolution, default set to 1000

output: An R data frame containing the three optimal thresholds, according to the three metrics: Accuracy, Balanced Accuracy and F1 Score


ZhengAndyTan/postLogistic documentation built on April 24, 2020, 12:03 a.m.