okm | R Documentation |
Clusters data using the OKM (Overlapping K-Means) clustering algorithm.
okm(x, centers, iter.max = 10, nstart = 1, trace = FALSE, method = "euclid")
x |
A numeric data matrix or data frame containing the data to be clustered. |
centers |
Either a positive integer indicating the number of clusters to create or a matrix of pre-initialized cluster centers. |
iter.max |
Maximum number of iterations allowed for the clustering algorithm (default is 10). |
nstart |
Number of random initializations to find the best result (default is 1). |
trace |
Logical value indicating whether to display the progress of the algorithm (default is 'FALSE'). |
method |
A string specifying the distance metric to use; options are 'euclid' (Euclidean distance) or 'manhattan' (Manhattan distance) (default is "euclid"). |
A list containing the clustering results, including: - 'cluster': Matrix indicating the cluster assignments for each data point. - 'centers': The final cluster centers. - 'tot.withinss': Total within-cluster sum of squares. - 'overlaps': The measure of overlap among clusters.
okm(iris[, -5], 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.