Understanding Predictive Query

View as Markdown

What is a Predictive Query?

A Predictive Query is a declarative syntax that defines a predictive modeling task in Kumo. It specifies the target variable to predict and the data context for training.

Kumo uses Predictive Query Language (PQL), a SQL-like syntax, to automate the ML pipeline, including feature engineering, training table generation, and model training.

Creating a Predictive Query

To train a model in Kumo:

  1. Navigate to New > Model from the side menu.

  2. On the Model Training page, enter a Model Name and optional Description.

  3. Select a Graph from your previously created graphs. After a graph is selected, its structure and linkages appear on the right side for reference.

  4. Write your Predictive Query (PQL) in the text area.

Example PQL

1PREDICT COUNT(transactions.*, 0, 30, days) = 0
2FOR EACH customers.customer_id
3WHERE COUNT(transactions.*, -90, 0, days) > 0

Model Training page with a completed Predictive Query entered

Model Settings

Before training, you can configure advanced model settings to:

  • Configure baseline and run mode.

  • Adjust hyperparameters in the model plan.

  • Modify training table generation settings.

By default, Kumo optimizes the model automatically. Use advanced settings to customize these defaults.