Skip to content

API Docs - v5.0.1

Tested Siddhi Core version: 5.1.4

It could also support other Siddhi Core minor versions.

Pmml

predict (Stream Processor)

This extension processes the input stream attributes according to the defined PMML standard model and outputs the processed results together with the input stream attributes.

Syntax

pmml:predict(<STRING> path.to.pmml.file, <STRING> input)

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
path.to.pmml.file

The path to the PMML model file.

STRING No No
input

An attribute of the input stream that is sent to the PMML standard model as a value to based on which the prediction is made. The predict function does not accept any constant values as input parameters. You can have multiple input parameters according to the input stream definition.

Empty Array STRING Yes No
Extra Return Attributes
Name Description Possible Types
output

All the processed outputs defined in the query. The number of outputs can vary depending on the query definition.

STRING
INT
DOUBLE
FLOAT
BOOL

Examples EXAMPLE 1

predict('<SP HOME>/samples/artifacts/0301/decision-tree.pmml', root_shell, su_attempted, num_root, num_file_creations, num_shells, num_access_files, num_outbound_cmds, is_host_login, is_guest_login , count, srv_count, serror_rate, srv_serror_rate)

This model is implemented to detect network intruders. The input event stream is processed by the execution plan that uses the pmml predictive model to detect whether a particular user is an intruder to the network or not. The output stream contains the processed query results that include the predicted responses.