Class Predictors


  • public class Predictors
    extends Object
    Class for managing DataRobot models.
    • Constructor Detail

      • Predictors

        public Predictors()
    • 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.