Skip to main content

What This Node Does

The Segment node groups rows into clusters using K-means on one or more numeric features. Use it to discover natural segments in your data (customers who behave similarly, products with comparable economics, accounts with comparable risk profiles) without hand-coding the rules. Segment can either pick the number of clusters automatically (the default) or run with a fixed cluster count when you already know how many segments you want.

When to Use This Node

Use the Segment node when you need to:
  • Identify customer segments by spend, frequency, and recency without hand-tuning thresholds
  • Cluster vendors or accounts by transaction volume, average size, and category mix
  • Group SKUs into pricing tiers based on margin, velocity, and revenue contribution
  • Find peer groups for benchmarking individual entities against similar ones
For known business rules (“VIP = >$10K annual spend”), a Filter or Formula node is the right tool. Use Segment when the natural breaks in the data are what you want to find, not impose.

Step-by-Step Usage Guide

1

Configure the buckets

  • Rows: the entity field(s) you want one segment label per. Most commonly customer_id, account_id, vendor_id, or sku.
  • Values: the numeric features to cluster on (e.g., total_spend, order_count, days_since_last_order). Pick an aggregation per field. Two to five features is the sweet spot.
  • Filters (optional): pre-filter the input (e.g., exclude inactive customers, limit to last 12 months).
The Segment node configuration with a Field List and Filters, Groups, and Values buckets, showing a numeric feature in the Values bucket to cluster on.
2

Decide auto-k or fixed-k

  • Auto (default): leave Fixed Clusters blank. Go Fig fits k = 2 through Max Clusters (default 8) and picks the best k by silhouette score. Use this when you’re exploring.
  • Fixed: set Fixed Clusters to a specific integer (2 to 20). Use this when you have a downstream constraint, e.g., a marketing program that maps to exactly 4 tiers.
3

Set Max Clusters (auto mode only)

Caps the search range when auto-k is on. Default 8 covers most business segmentation cases. Raise to 12 to 15 for large entity sets where you suspect more granular structure. Lower to 4 or 5 for executive-friendly outputs.
4

Run and inspect the segments

Output adds a segment field (integer label, 0-indexed) to each entity row. Connect a downstream Aggregation node to summarize the segments by feature (mean spend per segment, count per segment). That’s how you describe what each segment means in business language.

Tips and Best Practices

Scale matters in K-means: features with larger magnitudes dominate the distance metric. Go Fig auto-standardizes features before clustering so a feature in dollars and one in counts contribute on equal footing. No manual normalization required.
Two to five features is the sweet spot: K-means struggles in high-dimensional space (the curse of dimensionality). If you have 20 candidate features, pick the three or four most business-meaningful ones rather than throwing everything in.
Auto-k for exploration, fixed-k for production: Start with auto-k to see what natural groupings emerge. Once you’ve validated and named the segments with the business, switch to fixed-k so the segment IDs stay stable across runs.
Always describe segments downstream: A segment labeled 2 means nothing on its own. Run an Aggregation node on the output that emits mean and count per segment per feature. That’s the table you share with stakeholders, not the raw segment IDs.
Re-cluster on a cadence, not constantly: Segments shift as the underlying business changes. Re-running monthly or quarterly is typical. Re-running daily produces label churn that breaks downstream reports.
Filter out outliers first: K-means is sensitive to extreme values. If 99% of customers have order counts under 50 and one has 5,000, that outlier will likely sit alone in its own cluster and distort the rest. Use Filter to handle outliers before Segment.