Fix the classification cutoff for a deployed scorer
Source:R/singlesample-cutoff.R
fix_specimen_cutoff.RdStores a cutoff on the scale returned by score_specimen(). By default, it
scores the supplied training specimens and maximizes the Youden index
(sensitivity plus specificity minus one) over the observed scores. When
several cutoffs maximize the index, it uses the lowest score.
Usage
fix_specimen_cutoff(
deployable,
X_train = NULL,
y_train = NULL,
cutoff = NULL,
meta_train = NULL,
detected_train = NULL,
strict = FALSE
)Arguments
- deployable
A deployment object from
deploy_singlesample().- X_train
Training measurements in the format accepted by
score_specimen().- y_train
Numeric or integer 0/1 outcomes, with 1 for the positive class. Supply both classes in the same row order as
X_train.- cutoff
Optional finite numeric cutoff supplied by the user. Training measurements and outcomes are only used when
cutoffisNULL.- meta_train, detected_train
Optional metadata and detection mask for training specimens, passed to
score_specimen().- strict
Passed to
score_specimen().