Statistics: Multivariate Analysis: K-Means Cluster Analysis
Perform K-Means clustering.
This feature is for OriginPro only.
Minimum Origin Version Required: 8.6
1. kmeans ir:=1:end num:=3;
2. kmeans ir:=1:end num:=3 plot:=1 iy:=(1,3);
3. kmeans ir:=1:4 specify:=1 iinitial:=[book2]1!1:4;
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Variables | ir |
Input Range |
|
Observations to cluster. Note that beginning with Origin 2020b, there is a shortened syntax that follows the form [Book]Sheet!(N1:N2), N1 = the beginning column index and N2 being the ending column index in a contiguous range of columns. More complex strings from non-contiguous data of the form [Book]Sheet!([Book]Sheet!N1:N2,[Book]Sheet!N3:N4) are also possible. |
Observation Labels | labelr |
Input Range |
|
Select labels for observations. About syntax, refer to the Variables parameter. |
Standardize Variables | std |
Input int |
|
Specify the method to standardize variables.
Option list:
|
Number of Clusters | num |
Input int |
|
Number of clusters for observation classification. This option is not available when using Specify Initial Cluster Centers. |
Specify Initial Cluster Centers | specify |
Input int |
|
Specify Initial Cluster Centers (1), or use Number of Clusters (0) |
Initial Cluster Centers | iinitial |
Input Range |
|
Initial cluster centers specified by users |
Maximum Number of Iterations | iter |
Input int |
|
Specify the maximum number of iterations allowed in the analysis. |
Initial Cluster Centers | oinitial |
Input int |
|
Specify whether (1) or not (0) to report initial cluster centers. |
ANOVA | anova |
Input int |
|
Specify whether (1) or not (0) to report ANOVA. |
Cluster Membership | member |
Input int |
|
Specify whether (1) or not (0) to output cluster membership. |
Distance from Cluster | distance |
Input int |
|
Specify whether (1) or not (0) to calculate the distance between each observation and its corresponding cluster center. |
Cluster Plot | clusterPlot |
Input int |
|
Specify whether (1) or not (0) to create Cluster plot. |
Additional Group Graph | plot |
Input int |
|
Specify whether (1) or not (0) to create additional group graph. |
Select Variables for Plot | iy |
Input Range |
|
Range contains the data to be grouped for group graph, which is only available when plot is 1.
|
K-Means Report | rt |
Output ReportTree |
|
Specify the location of output report tree. |
Cluster Membership | rd |
Output ReportData |
|
Specify the location for the cluster membership and distance from cluster. |
Plot Data | rdplot |
Output ReportData |
|
Specify the sheet for plot data. This variable is hidden in the dialog. |
This function performs the K-Means Cluster Analysis on range data. For more information, see the Cluster Analysis.
kmeans ir:=1:4 num:=3 -r 2;
See the algorithm of K-Means Cluster Analysis.
See the reference of Cluster Analysis.