Class AbstractPMMLBackend

  • All Implemented Interfaces:
    org.kie.internal.task.api.prediction.PredictionService
    Direct Known Subclasses:
    PMMLRandomForest

    public abstract class AbstractPMMLBackend
    extends Object
    implements org.kie.internal.task.api.prediction.PredictionService
    • Field Detail

      • outputFields

        protected final List<? extends org.jpmml.evaluator.OutputField> outputFields
      • inputFeatures

        protected List<String> inputFeatures
      • outcomeFeatureName

        protected String outcomeFeatureName
      • confidenceThreshold

        protected double confidenceThreshold
    • Constructor Detail

      • AbstractPMMLBackend

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

      • train

        public void train​(org.kie.api.task.model.Task task,
                          Map<String,​Object> inputData,
                          Map<String,​Object> outputData)
        Method to train a model. In the PMML case, this is a no-op.
        Specified by:
        train in interface org.kie.internal.task.api.prediction.PredictionService
        Parameters:
        task - Human task data
        inputData - A map containing the input attribute names as keys and the attribute values as values.
        outputData - A map containing the output attribute names as keys and the attribute values as values.
      • preProcess

        protected abstract 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.
        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.