Hi   all    ,

                 I  was  doing    k-mean  clustering    through  which   i
could  find  out   each  and  every  clusters  and  the  contents
around    each  cluster   centroid   like    below  :-


x<-read.csv("normalizedata.csv", header = TRUE)    #To read the dataset

km<- kmeans(x, 3, 150)

print(km)    <<<----   in  this   I   could   get   every  clusters  and
centroids  .

km$cluster    <<-----  It   gave    me   the   clusters   which   comes
up   during   clustering  like





 [1] 3 3 1 2 3 2 1 2 1 3 2 1 3 1 1 1 3 2 1 1 1 1 3 1 1 2 2 2 1 3 3 1 3 3 2
2 2
 [38] 3 1 3 1 3 3 1 1 1 3 1 1 2 1 3 3 3 3 3 3 3 3 3 3 1 3 2 3 2 2 3 3 3 3 2
3 2
 [75] 1 2 2 1 1 3 3 1 3 1 1 1 1 3 3 2 1 3 3 3 1 3 1 1 1 1 1 2 1 3 1 1 1 2 1
3 3
[112] 1 3 1 2 1 1 1 1 1 1 1 2 2 1 3 1 2 3 1 1 3 2 1 1 1 2 1 3 2 1 3 1 1 1 3
2 1
[149] 3 2 3 3 3 3 1 2 1 1 1 1 1 1 3 2 2 2 1 1 1 3 3 1 1 3 2 1 3 1 1 1 1 1 2
1 1
[186] 3 1 2 1 3 2 3 2 1 2 1 2 3 1 1 1 2 3 2 1 1 2 3 3 1 2 2 1 3 1 1 2 3 3 1
1 3
[223] 3 1 1 3 3 3 2 2 1 3 3 3 2 2 1 2 3 1 1 2 1 1 1 1 1 3 1 3 2 1 1 3 1 1 2
2 3
[260] 1 3 3 3 1 1 2 1 3 1 3 1 2 1 1 1 3 3 2 3 1 1 1 2 1 3 3 1 3 3 1 1 2 1 2
3 3

















But  in  case  of  SOM   clustering   when  i  had  tried    like    :-



require(kohonen)
require (som)    #To load Kohonen Package

x<-read.csv("normalizedata.csv",header=TRUE)

x.sc <- scale(x)    #To scale

set.seed(7)

xx.som<- SOM(data = x.sc, grid = somgrid(1, 3, "hexagonal"))    #som
function




print(xx.som)


I  got  :-








$codes
        hrefCount Number.of.times.Visited Total.time.Spent
[1,] -0.008926424              0.01642686      -0.01059301
[2,] -0.008926424              0.01642686      -0.01059301
[3,] -0.023231402             -0.06730921      -0.02705149



I  hope  this  are  the   centroids  ,   I need   the  cluster    results
like  kmeans   ,  how  to  achieve   it   ,  can  any  one    helps .



THanks

ASHIS

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to