ClusterPoints3D


Clusters 3D points using K Means Clustering method.

Syntax

C++
C#
Python
 
def ClusterPoints3D(
	inPoints: list[Point3D],
	/,
	*,
	inClusters: int = 2,
	inMaxIterations: int = 200,
	inSeed: int | None = 5489,
	inRunCount: int = 1
)
-> (
	outClusters: list[list[Point3D] | None],
	outCentroids: list[Point3D | None],
	outDistanceSum: float
)

Parameters

Name Type Range Default Description
Input value inPoints list[Point3D] Array of points to cluster
Input value inClusters int 2 - + 2 Number of clusters to extract
Input value inMaxIterations int 10 - 1000 200 Maximal number of KMeans iterations
Input value inSeed int | None 0 - + 5489 Seed used to initialize random number generators
Input value inRunCount int 1 - + 1 Defines how many times the algorithm will be executed
Output value outClusters list[list[Point3D] | None] Resulting Point3D clusters
Output value outCentroids list[Point3D | None] Center of found clusters
Output value outDistanceSum float Sum of distance squares from points in array to its respective cluster center