The KCLUS Procedure
Overview: KCLUS Procedure
The KCLUS procedure performs clustering (a common step in data exploration) in SAS Viya.
You can use the KCLUS procedure to read and write data in distributed form, and to perform clustering and scoring in parallel by making full use of multicore computers or distributed computing environments.
The KCLUS procedure performs a cluster analysis on the basis of distances that are computed from quantitative or qualitative variables (or both). The observations are divided into clusters such that every observation belongs to one and only one cluster.
The KCLUS procedure uses the k-means algorithm for clustering interval input variables, uses the k-modes algorithm for clustering nominal input variables, and uses k-prototypes algorithm for clustering mixed input that contains both interval and nominal variables.
The KCLUS procedure accomplishes the clustering by updating the cluster centroids and the cluster membership of the data iteratively until the convergence criterion (for example, the least squares criterion for the Euclidean distance in k-means clustering) is satisfied or until the maximum iteration number is reached.
PROC KCLUS produces brief summaries of the cluster analysis in two output data tables:
The OUT= data table is produced by the SCORE statement. This data table contains the cluster membership and distance variables for each observation in the input data table. It can be used for more detailed examination of the clusters.
The OUTSTAT= data table is produced by the PROC KCLUS statement. This data table can be used for more detailed examination of between-cluster statistics.