Skip to content
Corridor V1.26.03 is out, see what's new

Register a Feature Aggregate

Ask AI
TL;DR

Roll up many rows from a lower entity level into one value at this Feature’s entity (like each Customer’s max_account_balance across their Accounts). Tick Is Aggregated, write the logic in Python, Pandas, or Spark, and create. This page covers the aggregated case; for a transformation at the same entity level, see Feature.

Every registered object has an entity, the level it is computed at, such as Application, Account, or Customer. A regular Feature works with data already at its own entity, one row at a time. A Feature Aggregate works across levels: it takes many rows from a lower entity and rolls them up into a single value at the Feature’s entity. For example, a Customer has many Accounts, and a Feature Aggregate can turn those Account rows into one number per Customer, like their highest balance.

A Feature Aggregate is not a separate object type. It is simply a Feature with Is Aggregated ticked, which switches the Formula section into aggregation mode. Reach for it whenever your output needs to summarize child rows, like totaling a Customer’s balances across all their Accounts.

FeatureFeature Aggregate (this page)
Computes fromInputs already at the Feature’s entity levelMultiple rows at a lower entity level, rolled up to this Feature’s entity
Use whenThe output depends only on inputs already at the same entityYou need to summarize across child rows
Definition languagePython onlyPython, Pandas, or Spark
Examplerisk_tier from an Application’s ficomax_account_balance for each Customer

Follow these steps to register a Feature Aggregate.

On the Feature Engineering → Feature page, click + New Feature.

A name prompt opens first. Enter a descriptive name for the Feature (for example, Max Account Balance) and confirm to land on the full Feature form.

Tick Is Aggregated first. This is what turns the Formula section into aggregation mode.

Set the Type * - the output type of your aggregation, not the source column type (summing or taking a max → Numerical, returning a list → an Array type, a flag or label → String or Boolean).

Set the Entity * to the entity you are rolling up to (for example, Customer); inputs must come from this entity or a lower one.

Fill in the Alias. See Common Registration Info.

Under Input, pick the inputs the aggregation reads, from this Feature’s entity or a lower one. With Entity = Customer, you can pick Account-level inputs (for example, account); each becomes a variable in the editor, referenced by its alias.

Then write the aggregation in Python, Pandas, or Spark:

  • Python and Pandas receive one entity’s rows. The platform groups the table by your Feature’s entity and hands your code only the rows for the current entity (one Customer’s Accounts). You compute and return a single value for that entity. No groupBy needed.
  • Spark receives the whole, ungrouped table across every entity. You do the groupBy yourself and return a DataFrame keyed by the entity, plus an Output Dataframe Key.

The example below computes each Customer’s maximum balance across their open Accounts (Entity = Customer, input = account).

Each input table is exposed as a dictionary of lists, sliced to the current entity (one Customer’s Accounts). Return a single value.

# `account` is a data dictionary of one Customer's Accounts
open_balances = [
bal for bal, status in zip(
account['current_balance'], account['status']
)
if status == 'open' and bal is not None
]
if not open_balances:
return None
return max(open_balances)

Fill in the Properties (Description, Permissible Purpose, Group, and Keywords), then click Create at the bottom right. The Feature is saved as a draft and you land on its details page.

Once registered, the Feature Aggregate can be used downstream in Features, Models, and Policies, just like any Feature. You can also run a simulation on it and trace its lineage to every downstream object.

Next steps:

  • Build a Model or Policy that uses this Feature Aggregate.
  • Send it for approval so it can be used outside your draft workspace.
  • Computing at the same entity level instead? Register a regular Feature.