Class PredictionClient

  • All Implemented Interfaces:
    IPredictionClient

    public class PredictionClient
    extends java.lang.Object
    implements IPredictionClient
    The PredictionClient object provides access to the prediction endpoints of the DataRobot AI API. This object is not meant to be used directly but through the DataRobotAIClient.predict() method.
    • Constructor Detail

      • PredictionClient

        public PredictionClient​(IDataRobotAIClient client)
        IPredictionClient based API operations. Users will not need to instantiate this object directly. It can be accessed through DataRobotAIClient#predict.
        Parameters:
        client - DataRobotAIClient
    • Method Detail

      • setHttpMessageTransformer

        public void setHttpMessageTransformer​(Action<com.google.api.client.http.HttpRequest,​com.google.api.client.http.HttpResponse> httpMessageTransformer)
        internal
        Specified by:
        setHttpMessageTransformer in interface IPredictionClient
      • deploymentPredict

        public PredictionList deploymentPredict​(Deployment deployment,
                                                java.lang.String sourceFile)
                                         throws ClientException,
                                                java.io.FileNotFoundException
        Send a prediction request to the specified deployment
        Specified by:
        deploymentPredict in interface IPredictionClient
        Parameters:
        deployment - Who will service the request
        sourceFile - 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.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object