GetPredictions: Retrieve model predictions from predictJobId
Description
This function is called with a project descriptor and an
integer predictJobId, obtained from an earlier call to
RequestPredictions. It returns the predictions generated
for the model and data specified in this prior function
call.
Usage
GetPredictions(project, predictJobId, type = "response", maxWait = 60)
Arguments
project
Either (1) a character string giving the unique alphanumeric
identifier for the project, or (2) a list containing the element projectId with this identifier.
predictJobId
Integer, identifying the prediction job
created by the call to RequestPredictions.
type
Character string, specifying the type of response for
binary classifiers; see Details.
maxWait
Integer, The maximum time (in seconds) to wait for the prediction job to complete
Value
Vector of predictions, depending on the modeling task
("Binary" or "Regression") and the value of the type parameter;
see Details.
Details
The contents of the return vector depends on both the modeling
task - binary classification or regression - and the value of
the type parameter. For regression tasks, the type parameter
is ignored and a vector of numerical predictions of the response
variable is returned. For binary classification tasks, either
a vector of predicted responses is returned if type has the
value "response" (the default), or a vector of probabilities
for the positive class is returned, if type is "probability".
This function will error if the requested job has errored, or
if it isn't complete within maxWait seconds.