Class Predictors
- java.lang.Object
-
- com.datarobot.prediction.compatible.Predictors
-
public class Predictors extends Object
Class for managing DataRobot models.
-
-
Constructor Summary
Constructors Constructor Description Predictors()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Iterator<IPredictorInfo>
getAllPredictors()
See all predictors loaded in the classpath.static Iterator<IPredictorInfo>
getAllPredictors(ClassLoader classLoader)
Retrieve all predictors from the classloader.static <T extends IPredictorInfo>
TgetPredictor()
Retrieve a single DataRobot model, if it is the only one in classpath.static <T extends IPredictorInfo>
TgetPredictor(ClassLoader classLoader)
Retrieve a single DataRobot model, if it is the only one in the specified classloader.static <T extends IPredictorInfo>
TgetPredictor(String modelId)
Get DataRobot model by modelId.static <T extends IPredictorInfo>
TgetPredictor(String modelId, ClassLoader classLoader)
Get DataRobot model from the classloader by model id.
-
-
-
Method Detail
-
getPredictor
public static <T extends IPredictorInfo> T getPredictor()
Retrieve a single DataRobot model, if it is the only one in classpath.- Type Parameters:
T
- Type of the model- Returns:
- implementation of the model.
-
getPredictor
public static <T extends IPredictorInfo> T getPredictor(ClassLoader classLoader)
Retrieve a single DataRobot model, if it is the only one in the specified classloader.- Type Parameters:
T
- type of the model.- Parameters:
classLoader
- - classloader where to search for the model.- Returns:
- instance of the implementation.
-
getPredictor
public static <T extends IPredictorInfo> T getPredictor(String modelId)
Get DataRobot model by modelId.- Type Parameters:
T
- type of the model.- Parameters:
modelId
- model id.- Returns:
- instance of the implementation.
-
getPredictor
public static <T extends IPredictorInfo> T getPredictor(String modelId, ClassLoader classLoader)
Get DataRobot model from the classloader by model id.- Type Parameters:
T
- type of the model.- Parameters:
modelId
- model id.classLoader
- classloader.- Returns:
- instance of the implementation.
-
getAllPredictors
public static Iterator<IPredictorInfo> getAllPredictors()
See all predictors loaded in the classpath.- Returns:
- all DataRobot models.
-
getAllPredictors
public static Iterator<IPredictorInfo> getAllPredictors(ClassLoader classLoader)
Retrieve all predictors from the classloader.- Parameters:
classLoader
- classloader with model.- Returns:
- all DataRobot models.
-
-