summary.clara            package:cluster            R Documentation

_S_u_m_m_a_r_y _M_e_t_h_o_d _f_o_r '_c_l_a_r_a' _O_b_j_e_c_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     Returns (and prints) a summary list for a 'clara' object. Printing
     gives more output than the corresponding 'print.clara' method.

_U_s_a_g_e:

     ## S3 method for class 'clara':
     summary(object, ...)
     ## S3 method for class 'summary.clara':
     print(x, ...)

_A_r_g_u_m_e_n_t_s:

x, object: a 'clara' object.

     ...: potential further arguments (require by generic).

_S_e_e _A_l_s_o:

     'clara.object'

_E_x_a_m_p_l_e_s:

     ## generate 2000 objects, divided into 5 clusters.
     set.seed(47)
     x <- rbind(cbind(rnorm(400, 0,4), rnorm(400, 0,4)),
                cbind(rnorm(400,10,8), rnorm(400,40,6)),
                cbind(rnorm(400,30,4), rnorm(400, 0,4)),
                cbind(rnorm(400,40,4), rnorm(400,20,2)),
                cbind(rnorm(400,50,4), rnorm(400,50,4))
     )
     clx5 <- clara(x, 5)
     ## Mis`classification' table:
     table(rep(1:5, rep(400,5)), clx5$clust) # -> 1 "error"
     summary(clx5)

     ## Graphically:
     par(mfrow = c(3,1), mgp = c(1.5, 0.6, 0), mar = par("mar") - c(0,0,2,0))
     plot(x, col = rep(2:6, rep(400,5)))
     plot(clx5)

