[R] clusterCrit package produces Nan

Pascal Oettli kridox at ymail.com
Thu Jan 30 03:16:12 CET 2014


Hello,

Please also reply to the list.

I am not really familiar with this calculation, but it is maybe due to
the fact you defined 8 nodes for your SOM, but your original data are
only classified within 3 nodes.

> datissimi = som(test, grid=somgrid(xdim=2, ydim=4, topo='rectangular'), rlen=500, keep.data=TRUE)
> somissimo = datissimi$unit.classif
> unique(somissimo)
[1] 2 4 8
>
> intCriteria(test, somissimo, "silhouette")
$silhouette
[1] NaN

If I modify the shape of the Kohonen map:

> datissimi = som(test, grid=somgrid(xdim=3, ydim=1, topo='rectangular'), rlen=500, keep.data=TRUE)
> somissimo = datissimi$unit.classif
> unique(somissimo)
[1] 1 2 3
>
> intCriteria(test, somissimo, "silhouette")
$silhouette
[1] 0.6478154

Hope this helps,
Pascal


On 30 January 2014 10:58, Paola Tellaroli <paola.tellaroli at gmail.com> wrote:
> Hello Pascal,
>
> you're right, sorry.
>
> The package I used for the som function is "kohonen", while data are:
>
>> dput(test)
> structure(c(37.28577, 8.902218, 17.9383, 38.80381, 6.825286,
> 18.44061, 37.25598, 8.693962, 18.09256, 38.81784, 7.005092, 18.17899,
> 37.54612, 8.262074, 18.07639, 38.87837, 6.592799, 18.31604, 37.56661,
> 8.651182, 17.98653, 38.7698, 6.596529, 18.46937, 37.59454, 8.546921,
> 17.93558, 39.00177, 6.508707, 18.40102, 37.62195, 8.422909, 18.03132,
> 38.86634, 7.024104, 18.30201, 37.19365, 8.662608, 18.01295, 38.37456,
> 7.173594, 18.24273, 37.63161, 8.495688, 18.05909, 38.92736, 6.884675,
> 18.44871, 37.30077, 8.488438, 18.02636, 38.60844, 7.004214, 18.456,
> 37.52518, 8.610817, 18.00498, 38.57547, 6.877532, 18.36552), .Dim = c(10L,
> 6L))
>
> Thank you,
>
> Paola
>
>
> On 29/gen/2014, at 20:25, Pascal Oettli wrote:
>
>>
>>
>>
>>
>> --
>> Pascal Oettli
>> Project Scientist
>> JAMSTEC
>> Yokohama, Japan
>



-- 
Pascal Oettli
Project Scientist
JAMSTEC
Yokohama, Japan




More information about the R-help mailing list