max_fp_threshold: Best Threshold Rule for a User's Maximum False Positive Rate

Description Usage Arguments Details Value See Also Examples

Description

Returns the best threshold rule based on true positive rate, where the rule has a false positive rate not exceeding a user specified maximum.

Usage

1
max_fp_threshold(x, group, pos_class, max_fp = 0.05)

Arguments

x

a numeric predictor.

group

binary grouping variable.

pos_class

group level for positive class.

max_fp

maximum false positive rate. Defaults to 0.05.

Details

Output quantities for false positive, true positive, and misclassification are percentages.

Value

See Also

accuracy_threshold, score_threshold

Examples

1
2
3
4
x <- c(rnorm(100,0,1),rnorm(100,2,1))
group <- c(rep(0,100),rep(2,100))
max_fp_threshold(x=x, group=group, pos_class=2, max_fp = 0.05)
max_fp_threshold(x=x, group=group, pos_class=0, max_fp = 0.05)

TheLondonPeacock/SeaClass documentation built on May 8, 2019, 3:42 p.m.