Interface PredictionService


  • public interface PredictionService
    Interface which allows a prediction or recommendation service implementation to be trained with task data and return outcome predictions based on task input.

    This interface is still considered subject to change.

    • Method Detail

      • getIdentifier

        String getIdentifier()
      • predict

        PredictionOutcome predict​(org.kie.api.task.model.Task task,
                                  Map<String,​Object> inputData)
        Return an outcome prediction for a set of input attributes.
        Parameters:
        task - Task information to be optionally used by the predictive model
        inputData - A map of input attributes with the attribute name as key and the attribute value as value.
        Returns:
        PredictionOutcome object which encapsulates the results from a prediction
      • train

        void train​(org.kie.api.task.model.Task task,
                   Map<String,​Object> inputData,
                   Map<String,​Object> outputData)
        Train a predictive model using task data and a set of input and outcome attributes.
        Parameters:
        task - Task information to be optionally used by the predictive model
        inputData - A map of input attributes with the attribute name as key and the attribute value as value.
        outputData - A map of output attributes (outcomes) with the attribute name as key and the attribute value as value.