Class PMMLRandomForest

  • All Implemented Interfaces:
    org.kie.internal.task.api.prediction.PredictionService

    public class PMMLRandomForest
    extends AbstractPMMLBackend
    • Constructor Detail

      • PMMLRandomForest

        public PMMLRandomForest()
      • PMMLRandomForest

        public PMMLRandomForest​(List<String> inputFeatures,
                                String outputFeatureName,
                                double confidenceThreshold,
                                File pmmlFile)
    • Method Detail

      • preProcess

        protected Map<String,​Object> preProcess​(Map<String,​Object> data)
        Returns the processed data (e.g. perform categorisation, etc). If no processing is needed, simply return the original data.
        Specified by:
        preProcess in class AbstractPMMLBackend
        Parameters:
        data - A map containing the input data, with attribute names as key and values as values.
        Returns:
        data A map containing the processed data, with attribute names as key and values as values.
      • getIdentifier

        public String getIdentifier()
      • predict

        public org.kie.internal.task.api.prediction.PredictionOutcome predict​(org.kie.api.task.model.Task task,
                                                                              Map<String,​Object> data)
        Returns a model prediction given the input data
        Parameters:
        task - Human task data
        data - A map containing the input attribute names as keys and the attribute values as values.
        Returns:
        A PredictionOutcome containing the model's prediction for the input data.