Frequent pattern growth

Supported in: Batch

Frequent pattern (fp) growth finds frequent patterns in your dataset.

Transform categories: Aggregate, Other

Declared arguments

  • Input dataset - Source dataset containing items columns and transaction column.
    Table
  • Items column - Array column containing the items for the patterns.
    Column<Array<String>>
  • Minimum support - Minimum fraction of how often a pattern needs to be present.
    Literal<Double>

Examples

Example 1: Base case

Argument values:

  • Input dataset: ri.foundry.main.dataset.a
  • Items column: customer_attributes
  • Minimum support: 0.6

Input:

customer_attributes
[ age_group: 20-30, country: Germany, gender: Female ]
[ age_group: 20-30, country: Germany, gender: Male ]

Output:

patternpattern_occurrencetotal_count
[ country: Germany, age_group: 20-30 ]22
[ age_group: 20-30 ]22
[ country: Germany ]22

Example 2: Null case

Argument values:

  • Input dataset: ri.foundry.main.dataset.a
  • Items column: customer_attributes
  • Minimum support: 0.0

Input:

customer_attributes
null

Output:

patternpattern_occurrencetotal_count

Example 3: Null case

Argument values:

  • Input dataset: ri.foundry.main.dataset.a
  • Items column: customer_attributes
  • Minimum support: 0.0

Input:

customer_attributes
[ age_group: 20-30, country: Germany, gender: Female ]
[ null ]

Output:

patternpattern_occurrencetotal_count
[ country: Germany ]12
[ country: Germany, age_group: 20-30 ]12
[ null ]12
[ age_group: 20-30 ]12
[ gender: Female ]12
[ gender: Female, country: Germany ]12
[ gender: Female, country: Germany, age_group: 20-30 ]12
[ gender: Female, age_group: 20-30 ]12

Example 4: Edge case

Argument values:

  • Input dataset: ri.foundry.main.dataset.a
  • Items column: customer_attributes
  • Minimum support: 0.0

Input:

customer_attributes
[ age_group: 20-30, country: Germany, gender: Female ]
[ age_group: 20-30, country: Germany, gender: Male ]

Output:

patternpattern_occurrencetotal_count
[ gender: Male ]12
[ gender: Male, country: Germany ]12
[ gender: Male, country: Germany, age_group: 20-30 ]12
[ gender: Male, age_group: 20-30 ]12
[ age_group: 20-30 ]22
[ country: Germany ]22
[ country: Germany, age_group: 20-30 ]22
[ gender: Female ]12
[ gender: Female, country: Germany ]12
[ gender: Female, country: Germany, age_group: 20-30 ]12
[ gender: Female, age_group: 20-30 ]12