cluster.error: Clustering error

View source: R/clustering_design.R

cluster.errorR Documentation

Clustering error

Description

This function computes the clustering error.

Usage

cluster.error(design, X = NULL, alpha = 1)

Arguments

design

a design matrix.

X

candidate points in [0,1]^p. If X is not provided, Sobol points are generated as candidate points.

alpha

power of the Euclidean distance.

Details

cluster.error computes the clustering error. The clustering error for a design D=[\bm x_1, \dots, \bm x_n]^T is defined as \frac{1}{N}\sum_{i=1}^n\sum_{\bm x\in{V_i}}\|\bm x - \bm x_i\|^\alpha, where V_i is the Voronoi cell of each design point \bm x_i for i=1,\dots,n, N is the size of X. When \alpha=2, we obtain K-means and when \alpha=1, we obtain K-medians.

Value

clustering error of the design.

Examples

n = 20
p = 3
D = randomLHD(n, p)
cluster.error(D)


SFDesign documentation built on June 22, 2025, 1:06 a.m.