Created
July 3, 2014 01:13
-
-
Save hoxo-m/33d2e3f1cc2c41f34c61 to your computer and use it in GitHub Desktop.
個人的な SOM のやり方メモ ref: http://qiita.com/hoxo_m/items/def85c5711f77ea7b3f6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(kohonen) | |
out.som <- som(scale(data), grid=somgrid(3,3,"rect"), rlen=1000) | |
plot(out.som, type="changes") | |
plot(out.som, type="counts") | |
if(ncol(out.som$codes) > 14) { | |
out.som$codes <- out.som$codes[, sort(names(rev(sort(apply(out.som$codes, 2, var)))[1:14]))] | |
} | |
plot(out.som, type="code", palette.name=rainbow) | |
out.som$unit.classif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment