Skip to content

Tessero\Cluster

← All classes

AI assistant

Build this with Claude Code, Cursor or Copilot

Copy a Tessero-tuned prompt for Tessero\Cluster, grounded in 5 real API signatures , into your IDE's AI. No chatbot, just exact context.

apply static
apply(string $name, mixed ...$args): mixed

Call a function by its SciPy/NumPy name: Cluster::apply('log_ndtr', $x).

kmeans static
kmeans(mixed $obs, mixed $kOrGuess, mixed $iter = 20, mixed $thresh = 1.0E-5): mixed

k-means from an explicit initial code book; returns the code book and mean distortion (scipy.cluster.vq.kmeans).

kmeans2 static
kmeans2(mixed $data, mixed $k, mixed $iter = 10, mixed $thresh = 1.0E-5, mixed $minit = 'matrix', mixed $missing = 'warn'): mixed

k-means clustering from explicit initial centroids (minit='matrix'); returns centroids and labels (scipy.cluster.vq.kmeans2).

vq static
vq(mixed $obs, mixed $codeBook): mixed

Assign each observation to the nearest code-book vector by Euclidean distance (scipy.cluster.vq.vq).

whiten static
whiten(mixed $obs): mixed

Normalize observations per feature by their population standard deviation (scipy.cluster.vq.whiten).