stepFlexclust           package:flexclust           R Documentation

_R_u_n _F_l_e_x_C_l_u_s_t _A_l_g_o_r_i_t_h_m_s _R_e_p_e_a_t_e_d_l_y

_D_e_s_c_r_i_p_t_i_o_n:

     Runs clustering algorithms repeatedly for different numbers of
     clusters and returns the minimum within cluster distance solution
     for each.

_U_s_a_g_e:

     stepFlexclust(x, k, nrep=3, verbose=TRUE, FUN = kcca, drop=TRUE,
                   group=NULL, simple=FALSE, ...)

     ## S4 method for signature 'stepFlexclust, missing':
     plot(x, y,
       type=c("barplot", "lines"), totaldist=NULL,
       xlab=NULL, ylab=NULL, ...)

     ## S4 method for signature 'stepFlexclust':
     getModel(object, which=1)

_A_r_g_u_m_e_n_t_s:

     ...: passed to 'kcca' or 'cclust'.

       k: A vector of integers passed in turn to the 'k' argument of
          'kcca'

    nrep: For each value of 'k' run 'kcca' 'nrep' times and keep only
          the best solution.

     FUN: Cluster function to use, typically 'kcca' or 'cclust'.

 verbose: If 'TRUE', show progress information during computations.

    drop: If 'TRUE' and 'K' is of length 1, then a single cluster
          object is returned instead of a '"stepFlexclust"' object.

   group: An optional grouping vector for the data, see 'kcca' for
          details.

  simple: Return an object of class 'kccasimple'?

       x: Object of class '"stepFlexclust"'.

       y: Not used.

    type: Create a barplot or lines plot.

totaldist: Include value for 1-cluster solution in plot? Default is
          'TRUE' if 'K' contains '2', else 'FALSE'.

xlab, ylab: Graphical parameters.

  object: Object of class '"stepFlexclust"'.

   which: Number of model to get. If character, interpreted as number
          of clusters.

_A_u_t_h_o_r(_s):

     Friedrich Leisch

_E_x_a_m_p_l_e_s:

     data("Nclus")
     plot(Nclus)

     cl1 = stepFlexclust(Nclus, k=2:7, FUN=cclust)
     cl1

     plot(cl1)

     getModel(cl1, 4)

     opar=par("mfrow")
     par(mfrow=c(2,2))
     for(k in 3:6){
       image(getModel(cl1, as.character(k)), data=Nclus)
       title(main=paste(k, "clusters"))
     }
     par(opar)

