Class LearningSession

  • All Implemented Interfaces:
    INeedClient, java.io.Serializable

    public class LearningSession
    extends java.lang.Object
    implements java.io.Serializable, INeedClient
    A reference to a LearningSession on the DataRobot server. Client code that uses the DataRobot AI API package generally should not construct these objects directly, they should be instantiated by AI API Client methods. This object may be out of sync with the DataRobot sever, for example, if multiple processes or users have permission to modify or delete it on the server.
    See Also:
    Serialized Form
    • Constructor Detail

      • LearningSession

        public LearningSession()
    • Method Detail

      • getId

        public java.lang.String getId()
        Get the unique identifier of this LearningSession
        Returns:
        The ID of this learning session
      • getDatasetId

        public java.lang.String getDatasetId()
        Get the unique identifier of the Dataset this LearningSession learned from
        Returns:
        The ID of the dataset connected to this learning session
      • getName

        public java.lang.String getName()
        Get the name of this LearningSession
        Returns:
        The name of this learning session
      • getTarget

        public java.lang.String getTarget()
        Get the target of this LearningSession
        Returns:
        The target of this learning session
      • getCreatedOn

        public org.joda.time.DateTime getCreatedOn()
        Retrieve the datetime this LearningSession was created
        Returns:
        The creation datetime of this learning session
      • getModelCount

        public int getModelCount()
        Retrieve number of models trained as part of this learning session. Note that these are not unique algorithms attempted, but encompass the combination of different algorithms trained against varying sample sizes from the training dataset.
        Returns:
        The number of models trained as part of this learning session
      • getEvaluation

        public Evaluation getEvaluation()
                                 throws ClientException
        Retrieve performance information for the given learning session. For details on how to interpret this information, see the learning session documentation.
        Returns:
        The Evaluation of this learning session
        Throws:
        ClientException
      • setDatasetId

        public void setDatasetId​(java.lang.String datasetId)
        internal
      • setDeployment

        public void setDeployment​(Deployment deployment)
        internal
      • getAdditionalProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getAdditionalProperties()
        internal
      • setAdditionalProperty

        public void setAdditionalProperty​(java.lang.String name,
                                          java.lang.Object value)
        internal
      • predict

        public PredictionList predict​(java.lang.String sourceFile)
                               throws ClientException,
                                      java.io.FileNotFoundException
        Make predictions on new data using this learning session
        Parameters:
        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.
      • hashCode

        public int hashCode()
        internal
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        internal
        Overrides:
        equals in class java.lang.Object
      • toString

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