Skip to contents

Run fuzzy c-means clustering over a grid of candidate fuzziness parameters, select the best fuzziness parameter using the XB index, and return the corresponding clustering result.

Usage

fcmclust_auto(
  x,
  nclus,
  vec_m = seq(from = 1.1, to = 2.5, by = 0.1),
  nstart = 10,
  iter_max = 100,
  reltol = 1e-04,
  verbose = FALSE,
  return_all_fits = 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.

vec_m

A numeric vector specifying candidate fuzziness parameters.

nstart

An integer specifying the number of random initializations.

iter_max

An integer specifying the maximum number of iterations.

reltol

A numeric value specifying the relative tolerance for convergence.

verbose

A logical value indicating whether to print convergence messages.

return_all_fits

A logical value indicating whether to return all fitted models over vec_m.

Value

An object of class "fcmclust_auto" (inheriting from "fcmclust"), corresponding to the selected fuzziness parameter, with additional components:

  • best_m: The selected fuzziness parameter.

  • xb: The XB index of the selected solution.

  • vec_m: Candidate fuzziness parameters.

  • xb_grid: XB index values corresponding to vec_m.

  • all_fits: A list of fitted models for all candidate values of m if return_all_fits = TRUE, otherwise NULL.

Details

This is the recommended default interface for most users.