Hello,
Your example is difficult to reproduce.
Please
1. use dput() to attach data
2. indicate the package(s) you used. There are at least 3 packages
with a "som" function. It seems you used "RSNNS".
And when I run your code, there is no "unit.classif" in
"datissimi"
> datissimi$unit.classif
NULL
Regards,
Pascal
On 30 January 2014 01:39, Paola Tellaroli <paola.tellaroli at gmail.com>
wrote:> I'm trying to compute the Silhouette value of a clustering partition
done with SOM method using the function intCriteria of the clusterCrit package
but it returns me a Nan value: somebody knows why?
>
> To simplify my case, here there is an example:
>
> < test
> [,1] [,2] [,3] [,4] [,5] [,6]
> [1,] 37.28577 8.902218 17.93830 38.80381 6.825286 18.44061
> [2,] 37.25598 8.693962 18.09256 38.81784 7.005092 18.17899
> [3,] 37.54612 8.262074 18.07639 38.87837 6.592799 18.31604
> [4,] 37.56661 8.651182 17.98653 38.76980 6.596529 18.46937
> [5,] 37.59454 8.546921 17.93558 39.00177 6.508707 18.40102
> [6,] 37.62195 8.422909 18.03132 38.86634 7.024104 18.30201
> [7,] 37.19365 8.662608 18.01295 38.37456 7.173594 18.24273
> [8,] 37.63161 8.495688 18.05909 38.92736 6.884675 18.44871
> [9,] 37.30077 8.488438 18.02636 38.60844 7.004214 18.45600
> [10,] 37.52518 8.610817 18.00498 38.57547 6.877532 18.36552
>
> < datissimi = som(test, grid=somgrid(xdim=2, ydim=4,
> topo='rectangular'),
rlen=500, keep.data=T)
>
>> somissimo = datissimi$unit.classif
>
>> intCriteria(test, somissimo, "Silhouette")
> $silhouette
> [1] NaN
>
> Thanks,
>
> Paola
> ______________________________________________
> R-help at 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.
--
Pascal Oettli
Project Scientist
JAMSTEC
Yokohama, Japan