Package com.datarobot
Interface IPredictionClient
-
- All Known Implementing Classes:
PredictionClient
public interface IPredictionClientTheIPredictionClientinterface provides access toPredictionrelated endpoints for the AI API
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PredictionListaiPredict(java.lang.String aiId, java.lang.String target, java.lang.String sourceFile)Retrieve AI predictions against data.PredictionListdeploymentPredict(Deployment deployment, java.lang.String sourceFile)Send a prediction request to the specified deploymentAction<com.google.api.client.http.HttpRequest,com.google.api.client.http.HttpResponse>getHttpMessageTransformer()voidsetHttpMessageTransformer(Action<com.google.api.client.http.HttpRequest,com.google.api.client.http.HttpResponse> httpMessageTransformer)
-
-
-
Method Detail
-
getHttpMessageTransformer
Action<com.google.api.client.http.HttpRequest,com.google.api.client.http.HttpResponse> getHttpMessageTransformer()
-
setHttpMessageTransformer
void setHttpMessageTransformer(Action<com.google.api.client.http.HttpRequest,com.google.api.client.http.HttpResponse> httpMessageTransformer)
-
deploymentPredict
PredictionList deploymentPredict(Deployment deployment, java.lang.String sourceFile) throws ClientException, java.io.FileNotFoundException
Send a prediction request to the specified deployment- Parameters:
deployment- Who will service the requestsourceFile- The data on which to predict via a filepath on the local system- Returns:
PredictionList- Throws:
ClientException- when 4xx or 5xx response is received from server, or errors in parsing the response.java.io.FileNotFoundException- when a file with the specified pathname does not exist, or if the file does exist but is inaccessible for some reason.
-
aiPredict
PredictionList aiPredict(java.lang.String aiId, java.lang.String target, java.lang.String sourceFile) throws ClientException, java.io.FileNotFoundException
Retrieve AI predictions against data. Note an AI must be trained withAI.learn(java.lang.String, java.lang.String)or an existing learning session must be added to the AI withAI.addLearningSession(com.datarobot.model.LearningSession)orIAIClient.addLearningSession(java.lang.String, java.lang.String, java.lang.String)before predictions can occur.- Parameters:
aiId- The ID of the AI which to predict ontarget- The name of the selected target feature to predictsourceFile- The data on which to predict via a filepath on the local system- Returns:
PredictionList- Throws:
ClientException- when 4xx or 5xx response is received from server, or errors in parsing the response.java.io.FileNotFoundException- when a file with the specified pathname does not exist, or if the file does exist but is inaccessible for some reason.
-
-