Tunny Icon
TunnyDocs

The next-gen Grasshopper optimization tool.

Overview

The Cluster Scatter 2D and Cluster Scatter 3D widgets group optimization trials into clusters to reveal structure in objective or parameter space.

Method Summary

Method Role Strength Limitation
k-means Partition data into k clusters Fast, intuitive, WCSS measurable Assumes spherical clusters
Elbow Auto-estimate optimal k No manual k selection needed Less reliable on smooth WCSS curves

Initialization Strategies for k-means

Both use Lloyd's algorithm (assign → update → converge). Only the initial centroid selection differs.

Strategy Method Best for
k-means++ D²-proportional probabilistic sampling Default — avoids local optima
Deterministic Same D²-proportional sampling, fixed seed (42) Fully reproducible results

Workflow

flowchart TD
    start["Run clustering"] --> sel{"k selection"}
    sel -- "Elbow (Auto)" --> elbowStep["Try k=2..max_k with Elbow method<br/>→ auto-pick best k"]
    elbowStep --> runElbow["Run k-means with chosen k"]
    sel -- "Manual" --> runManual["Run k-means with user-specified k"]

    init{"Init strategy<br/>(applies within k-means)"}
    init -- "k-means++" --> initA["Probabilistic D² sampling<br/>(seed derived from n, k)"]
    init -- "Deterministic" --> initB["Same D² sampling,<br/>seed fixed to 42"]

Input Space

Setting Features used Best analysis
Objective Space Objective values only Find trials with similar performance
Variable Space Parameter values only Identify patterns in design variables
Combined Objectives + parameters See joint structure across both spaces
  • Dendrogram: hierarchical clustering, no upfront kk
  • PCA Biplot: standardized 2D principal-component projection
  • SOM Map: Self-Organizing Map, topology-preserving 2D map