Skip to content

Main content

Random Cluster Shape Comparison Benchmark Generator

Generate caller-parameterized compact, elongated Gaussian and radially perturbed arc groups, then compare deterministic k-means and flat-kernel mean shift on the same uniformly normalized points; retain source labels separately from fitted labels, finite-budget failures and model parameters without claiming universal clustering quality.

Loading tool…

Description

Generate caller-parameterized compact, elongated Gaussian and radially perturbed arc groups, then compare deterministic k-means and flat-kernel mean shift on the same uniformly normalized points; retain source labels separately from fitted labels, finite-budget failures and model parameters without claiming universal clustering quality.

Synthetic statistical data separates a specified generating model from the values observed in a finite draw. A model parameter, a sample summary, and the result of a fitted analysis answer different questions; retaining them separately makes numerical and statistical checks easier to interpret.

Generate caller-parameterized compact, elongated Gaussian and radially perturbed arc groups, then compare deterministic k-means and flat-kernel mean shift on the same uniformly normalized points; retain source labels separately from fitted labels, finite-budget failures and model parameters without claiming universal clustering quality.

When to use this tool

Use this generator to create reproducible cluster shape comparison benchmark cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.

How to use the tool and how it works

  1. Supply shapes, settings, maximumIterations in the field shapes below. Set seed when you need an explicit replay.
  2. Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
  3. Read points, sourceLabels, distanceScale, runs. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.

Generate rotated compact, elongated, or arc-shaped two-dimensional groups with construction labels. Normalize coordinates and run k-means and mean shift for each supplied center-count and normalized-bandwidth setting.1

Input fieldMeaning and unitsAccepted input
shapesShapesRequired. Array of Object; no unknown keys. or Object; no unknown keys. or Object; no unknown keys.; minimum items 1; maximum items 8.
settingsSettingsRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 8.
settings[].centerCountCenter CountRequired. Safe integer; minimum 1; maximum 8.
settings[].normalizedBandwidthNormalized BandwidthRequired. Finite number; strictly above 0.
maximumIterationsMaximum IterationsRequired. Safe integer; minimum 1; maximum 1000.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
pointsPointsRequired. Array of Array of Finite number.; minimum items 1; maximum items 8.; minimum items 1; maximum items 128.
sourceLabelsSource LabelsRequired. Array of Safe integer; minimum -1; maximum 7.; minimum items 1; maximum items 128.
distanceScaleDistance ScaleRequired. Finite number; strictly above 0.
runsRunsRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 8.
runs[].centerCountCenter CountRequired. Safe integer; minimum 1; maximum 8.
runs[].normalizedBandwidthNormalized BandwidthRequired. Finite number; strictly above 0.
runs[].kMeansK MeansRequired. Object; no unknown keys.
runs[].kMeans.centroidsCentroidsRequired. Array of Array of Finite number.; minimum items 1; maximum items 8.; minimum items 1; maximum items 128.
runs[].kMeans.labelsLabelsRequired. Array of Safe integer; minimum 0; maximum 127.; minimum items 1; maximum items 128.
runs[].kMeans.iterationsIterationsRequired. Safe integer; minimum 1; maximum 1000.
runs[].meanShiftMean ShiftRequired. Object; no unknown keys.
runs[].meanShift.modesModesRequired. Array of Array of Finite number.; minimum items 1; maximum items 8.; minimum items 1; maximum items 128.
runs[].meanShift.labelsLabelsRequired. Array of Safe integer; minimum 0; maximum 127.; minimum items 1; maximum items 128.
randomnessReplay source and normalized 32-bit seed, or null seed for an advancing context source.Required. Object; no unknown keys.
randomness.seedOptional safe-integer replay seed; normalization and precedence are explained below.Required. Safe integer. or Null.
randomness.sourceSourceRequired. Text; one of "context", "seed".

An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.

json
{
  "input": {
    "shapes": [
      {
        "kind": "elongated",
        "center": [
          4,
          0
        ],
        "pointCount": 2,
        "rotationDegrees": 0,
        "majorDeviation": 1,
        "minorDeviation": 0.2
      },
      {
        "kind": "arc",
        "center": [
          -4,
          0
        ],
        "pointCount": 2,
        "rotationDegrees": 0,
        "radius": 2,
        "radialDeviation": 0,
        "startDegrees": 0,
        "sweepDegrees": 90
      }
    ],
    "settings": [
      {
        "centerCount": 1,
        "normalizedBandwidth": 3
      }
    ],
    "maximumIterations": 1,
    "seed": 42
  },
  "output": {
    "points": [
      [
        -3.631592769364688,
        1.9657762111734947
      ],
      [
        -3.580514346968061,
        1.9555131773783494
      ],
      [
        2.1583728152164032,
        -0.22817641419080484
      ],
      [
        3.043837770615851,
        -0.05460522097652209
      ]
    ],
    "sourceLabels": [
      1,
      1,
      0,
      0
    ],
    "distanceScale": 3.631592769364688,
    "runs": [
      {
        "centerCount": 1,
        "normalizedBandwidth": 3,
        "kMeans": {
          "centroids": [
            [
              -0.13836191570373313,
              0.2504760296968153
            ]
          ],
          "labels": [
            0,
            0,
            0,
            0
          ],
          "iterations": 1
        },
        "meanShift": {
          "modes": [
            [
              -0.13836191570373313,
              0.2504760296968153
            ]
          ],
          "labels": [
            0,
            0,
            0,
            0
          ]
        }
      }
    ],
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • Returned solver coordinates use the normalized scale. Shape labels describe generation rather than guaranteed recovered clusters, and bounded iterations or numeric work can fail. This is synthetic method comparison, not measured cluster quality.
  • A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
  • The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.

Alternative or Complementary methods

For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.

References

  1. Tool behavior and example: Random Cluster Shape Comparison Benchmark Generator — tool.io

Similar or alternative tools

  • Random Cluster Initialization Sensitivity Benchmark Generator

    Generate one labeled Gaussian mixture and compare k-means++ starting-center coverage across explicit seeds using uniformly scaled squared distances; report initial centers and nearest-center costs, not iterative fits or an optimality guarantee.

  • Random Fuzzy Cluster Membership Benchmark Generator

    Generate one labeled Gaussian mixture and compare existing fuzzy memberships with possibilistic typicalities under supplied parameters in uniformly normalized coordinates; retain the cores' last-update weights and centroids without treating typicalities as probabilities or claiming convergence from an iteration count.