predict
Description
Performs prediction based on the trained model and input data.
Syntax
| predict <algorithm> <model_id> <input_fields>
Required arguments
info
The supported algorithms are available in the repository documentation.
Parameter | Syntax | Description |
---|---|---|
<algorithm> | <algorithm_name> | The name of the prediction algorithm supported by the internal storage mechanisms. |
<model_id> | model_id = "<model_id>" | ID of the trained model. |
Optional arguments
Parameter | Syntax | Description |
---|---|---|
<input_fields> | <fields> = "field1, field2, ... | A list of fields from the input data to be passed to the predict prediction function. |
Query examples
Example #1
source user_operations_train
| peval operation_type_ssh=if(operation_type.keyword == "ssh_connect", 1, 0), operation_type_1c=if(operation_type.keyword == "1c_connect", 1, 0), operation_type_view_dashboard=if(operation_type.keyword == "view_dashboard", 1, 0), operation_type_gitlab=if(operation_type.keyword == "gitlab_connect", 1, 0)
| fields operation_type_ssh, operation_type_1c, operation_type_view_dashboard, operation_type_gitlab
| predict kmeans model_id="4wedvml"
Example #2
source user_operations_train
| peval operation_type_ssh=if(operation_type.keyword == "ssh_connect", 1, 0), operation_type_1c=if(operation_type.keyword == "1c_connect", 1, 0), operation_type_view_dashboard=if(operation_type.keyword == "view_dashboard", 1, 0), operation_type_gitlab=if(operation_type.keyword == "gitlab_connect", 1, 0)
| predict kmeans model_id="4wedvml" fields="operation_type_ssh, operation_type_1c, operation_type_view_dashboard, operation_type_gitlab"