okm: Clusters data using the OKM (Overlapping K-Means) clustering...

View source: R/okm.R

okmR Documentation

Clusters data using the OKM (Overlapping K-Means) clustering algorithm.

Description

Clusters data using the OKM (Overlapping K-Means) clustering algorithm.

Usage

okm(x, centers, iter.max = 10, nstart = 1, trace = FALSE, method = "euclid")

Arguments

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").

Value

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.

Examples

okm(iris[, -5], 3)

COveR documentation built on Oct. 30, 2024, 9:28 a.m.

Related to okm in COveR...