# Predict Mediator

Predict Mediator captures data from messages communicate via WSO2 ESB, and passes them to a generated ML model to carry out predictions

### Syntax

            <predict>
                <model storage-location="string"/>
                <features>
                    <feature name="string" expression="XPath | JSONPath">+
                </features>
                <predictionOutput property="string"/>
            </predict>

- model storage-location

- ML model storage location can be either file system or registry
- If the model is stored in the registry, storage-location should have the prefix registry:
- If the model is stored in the file system, storage-location may contain the prefix file: (optional)

- features

- name : Name of the feature according to the generated model.
- expression : The XPath or JSONPath expression to extract the feature value from the payload.

- prediction output

- property : The message context property name, to which the prediction output value need to be set.