Skip to contents

Perform fuzzy c-means clustering with multiple random initializations and return the best solution based on the final objective value.

Usage

fcmclust(
  x,
  nclus,
  m = 2,
  nstart = 10,
  iter_max = 100,
  reltol = 1e-04,
  verbose = FALSE
)

Arguments

x

A numeric matrix of dimension \(n \times d\), where \(n\) is the number of observations and \(d\) is the number of features.

nclus

An integer specifying the number of clusters.

m

A numeric value greater than 1 specifying the fuzziness parameter.

nstart

An integer specifying the number of random initializations.

iter_max

An integer specifying the maximum number of iterations for each initialization.

reltol

A numeric value specifying the relative tolerance for convergence.

verbose

A logical value indicating whether to print convergence messages.

Value

An object of class "fcmclust" containing:

  • nclus: Number of clusters.

  • m: Fuzziness parameter.

  • nstart: Number of random initializations.

  • membership: Fuzzy membership matrix.

  • cluster: Hard cluster labels.

  • size: Cluster sizes.

  • centers: Cluster centers.

  • withinerror: Final objective value.

  • iter: Number of iterations until convergence.

  • call: Matched function call.