HomeDocsAPI Reference
Kumo.ai
Docs

ASSUMING

ASSUMING <aggregation_function>(<fact_table>.<column_name>, <start>, <end>) <comparison_operator> <constant> (Optional)

Description

To investigate hypothetical scenarios and evaluate impact of your actions or decisions, you can use the ASSUMING keyword. For example, you may want to investigate how much a user will spend if you give them a certain coupon or notification.

ASSUMING keyword is followed by a future-looking assumption, which will be assumed to be true during predictions.

Example

The syntax and some examples for this part of the query is as follows:

ASSUMING <aggregation_function>(<fact_table>.<column_name>, <start>, <end>) <comparison_operator> <constant>
ASSUMING COUNT(NOTIFICATIONS.*, 0, 7) > 2
ASSUMING LIST_DISTINCT(COUPONS.type, 0, 3) CONTAINS '50 percent off'
ASSUMING COUNT(NOTIFICATIONS.*, 0, 7) > 5 AND SUM(NOTIFICATIONS.LENGTH, 0, 7) > 10

Here, allowable aggregation functions and definitions of start and end parameters are the same as the ones under target and temporal entity filter, except both start and end should be non-negative. Also, remember that <fact_table> should include a key column linking it to the entity table's PK column.

Moreover, the assumption should be true often enough across the past data - it is hard to predict how users react to notifications if there is little information about past notifications in the database. Using a longer time window generally helps with this.

Allowable boolean operators are the same as for WHERE filter.