setThreshold | R Documentation |
This function will set a probability threshold cutoff to be used in predictions
in a two class Classification problem. This threshold is automatically read by predict2
and other
functions in this package when calculating new predictions.
setThreshold(model, thr)
model |
A model returned by |
thr |
A value between 0 and 1 to be used as a threshold or the
output of |
The caret model provided with a new item thr
and the
pred
data.frame updated, if it exists. If "thr" is a 'data.frame', the finalModel
is also updated using new parameters provided.
Objects results
and resample
remain unchanged. Use evaluate
to
obtain corrected statistics based on the new threshold.
predict2
update.train
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.