SetPredictionThreshold {datarobot} | R Documentation |
Set a custom prediction threshold for binary classification models.
Description
The prediction threshold is used by a binary classification model when deciding between the positive and negative class.
Usage
SetPredictionThreshold(model, threshold)
Arguments
model |
An S3 object of class dataRobotModel like that returned by the function GetModel, or each element of the list returned by the function ListModels. |
threshold |
numeric. The threshold to use when deciding between the positive and negative class. Should be between 0 and 1 inclusive. |
Details
Note: This feature can only can be used when PredictionThresholdReadOnly
is FALSE
.
Models typically cannot have their prediction threshold modified if they have been used to
set a deployment or predictions have been made with the dedicated prediction API.
Value
Returns NULL but updates the model in place.
Examples
## Not run:
projectId <- "59a5af20c80891534e3c2bde"
modelId <- "5996f820af07fc605e81ead4"
model <- GetModel(projectId, modelId)
SetPredictionThreshold(model, threshold = 0.6)
## End(Not run)
[Package datarobot version 2.18.6 Index]