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 and Description
    --- | ---
    `String` | `getIdentifier()`
    `PredictionOutcome` | `predict(org.kie.api.task.model.Task task, Map<String,Object> inputData)` Return an outcome prediction for a set of input attributes.
    `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.

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

Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.