Package org.kie.internal.task.api.prediction

## 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 Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `getIdentifier()` |
    `PredictionOutcome` | `predict​(org.kie.api.task.model.Task task, java.util.Map<java.lang.String,​java.lang.Object> inputData)` | Return an outcome prediction for a set of input attributes.
    `void` | `train​(org.kie.api.task.model.Task task, java.util.Map<java.lang.String,​java.lang.Object> inputData, java.util.Map<java.lang.String,​java.lang.Object> outputData)` | Train a predictive model using task data and a set of input and outcome attributes.

- - ### Method Detail

    - #### getIdentifier

          java.lang.String getIdentifier()

    - #### predict

          PredictionOutcome predict​(org.kie.api.task.model.Task task,
                                    java.util.Map<java.lang.String,​java.lang.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,
                     java.util.Map<java.lang.String,​java.lang.Object> inputData,
                     java.util.Map<java.lang.String,​java.lang.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.