Package com.datarobot.model
Class LearningSession
- java.lang.Object
-
- com.datarobot.model.LearningSession
-
- All Implemented Interfaces:
INeedClient,java.io.Serializable
public class LearningSession extends java.lang.Object implements java.io.Serializable, INeedClient
A reference to aLearningSessionon 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 Summary
Constructors Constructor Description LearningSession()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)internaljava.util.Map<java.lang.String,java.lang.Object>getAdditionalProperties()internalorg.joda.time.DateTimegetCreatedOn()Retrieve the datetime thisLearningSessionwas createdjava.lang.StringgetDatasetId()Get the unique identifier of theDatasetthisLearningSessionlearned fromEvaluationgetEvaluation()Retrieve performance information for the given learning session.LearningSessionFeaturesgetFeatures()Retrieve features associated with this learning session.java.lang.StringgetId()Get the unique identifier of thisLearningSessionintgetModelCount()Retrieve number of models trained as part of this learning session.java.lang.StringgetName()Get the name of thisLearningSessionjava.lang.StringgetTarget()Get the target of thisLearningSessioninthashCode()internalPredictionListpredict(java.lang.String sourceFile)Make predictions on new data using this learning sessionvoidrefresh()Refresh this object with the server.voidsetAdditionalProperty(java.lang.String name, java.lang.Object value)internalvoidsetClient(IDataRobotAIClient client)internalvoidsetDatasetId(java.lang.String datasetId)internalvoidsetDeployment(Deployment deployment)internaljava.lang.StringtoString()
-
-
-
Method Detail
-
setClient
public void setClient(IDataRobotAIClient client)
internal- Specified by:
setClientin interfaceINeedClient
-
getId
public java.lang.String getId()
Get the unique identifier of thisLearningSession- Returns:
- The ID of this learning session
-
getDatasetId
public java.lang.String getDatasetId()
Get the unique identifier of theDatasetthisLearningSessionlearned from- Returns:
- The ID of the dataset connected to this learning session
-
getName
public java.lang.String getName()
Get the name of thisLearningSession- Returns:
- The name of this learning session
-
getTarget
public java.lang.String getTarget()
Get the target of thisLearningSession- Returns:
- The target of this learning session
-
getCreatedOn
public org.joda.time.DateTime getCreatedOn()
Retrieve the datetime thisLearningSessionwas 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
Evaluationof this learning session - Throws:
ClientException
-
refresh
public void refresh() throws ClientExceptionRefresh this object with the server.- 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.
-
getFeatures
public LearningSessionFeatures getFeatures() throws ClientException
Retrieve features associated with this learning session. Values for these features must be provided when making aPrediction- Returns:
LearningSessionFeatures- Throws:
ClientException- when 4xx or 5xx response is received from server, or errors in parsing the response.
-
hashCode
public int hashCode()
internal- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
internal- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-