HomeDocsAPI Reference
Kumo.ai
Docs

entity_candidate_aggregation

entity_candidate_aggregation: <Aggregation_Function>(<target_table>.<column_name>, <start>, <end>) AS <result_column_name> (Optional)

Description

This field can be used used to specify hypothetical future-looking information that the user can supply at batch prediction time, such as the type of discount sent to the user. It should always be used in conjunction with the entity_candidate field.

The syntax of the aggregation follows the same instructions as the syntax for the target column.
result_column_name should be the name of a column, provided inside of the entity_candidate table to supply this information at batch prediction time. The schema of the entity_candidate candidate table should contain the column with the entity primary key and <result_column_name>, see entity_candidate_aggregation.

Supported Task Types

  • All

Example

entity_candidate_aggregation: FIRST(coupon.discount_type, 0, 5) AS next_discount_type

In the above example, the entity_candidate table should contain two columns: one with the same name as the entity primary key that contains valid user IDs, and a column called next_discount_type that contains the valid discount type sent first to corresponding users in the future 5 days.

🚧

NOTE: entity_candidate_aggregation is currently experimental.