ensemble                package:clue                R Documentation

_C_l_u_s_t_e_r _E_n_s_e_m_b_l_e_s

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

     Creation and manipulation of cluster ensembles.

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

     cl_ensemble(..., list = NULL)
     as.cl_ensemble(x)
     is.cl_ensemble(x)

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

     ...: R objects representing clusterings of the same kind (either
          all partitions or all hierarchies) on the same objects.

    list: a list of R objects as in '...'.

       x: for 'as.cl_ensemble', an R object as in '...'; for
          'is.cl_ensemble', an arbitrary R object.

_D_e_t_a_i_l_s:

     'cl_ensemble' creates cluster ensembles, which are realized as
     lists of clusterings with additional class information.   All
     clusterings in an ensemble must be of the same kind, and have the
     same number of objects.  If all clusterings are partitions, this
     list has class '"cl_partition_ensemble"' and inherits from
     '"cl_ensemble"'; if all clusterings are hierarchies, it has class
     '"cl_hierarchy_ensemble"' and inherits from '"cl_ensemble"'.  
     Empty ensembles cannot be categorized according to the kind of
     clusterings they contain, and hence only have class
     '"cl_ensemble"'.

     The list representation makes it possible to use 'lapply' for
     computations on the individual clusterings in (i.e., the
     components of) a cluster ensemble.

     Available methods for cluster ensembles include those for
     subscripting, 'c', 'rep', and 'print'.

     Note that (currently), 'as.cl_ensemble' assumes that unclassed
     lists represent _single_ clusterings, as this in particular holds
     true for 'kmeans' in versions of R prior to 2.1.0.  This may
     change eventually.

_V_a_l_u_e:

     'cl_ensemble' returns a list of the given clusterings, with
     additional class information (see *Details*).

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

     d <- dist(USArrests)
     hclust_methods <- c("ward", "single", "complete", "average",
                         "mcquitty", "median", "centroid")
     hclust_results <- lapply(hclust_methods, function(m) hclust(d, m))
     ## Now create an ensemble from the results.
     hens <- cl_ensemble(list = hclust_results)
     names(hens) <- hclust_methods 
     hens
     ## Subscripting.
     hens[1 : 3]
     ## Replication.
     rep(hens, 3)
     ## And continue to analyze the ensemble, e.g.
     cl_dissimilarity(hens, method = "gamma")

