Download Speaking Serial R with a Parallel Accent
Transcript
CHAPTER 13. MODEL-BASED CLUSTERING 99 of 132 [1] 0.3333 0.3673 0.2994 null device 1 ✝ ✆ Finally, Figure 13.2 shows the visualization created by this script. iris (true) iris (k−Means) 0.6201 1 0 PC2 −1 ● ● ● ● ●● ●●● ● ●●●● ●●● ● ● ● ●●● ● ● ●●●● ● ●● ● ●● ● ● ● ● ●● ● ●●● ● ● ● −2 1 0 PC2 ● ●● ●●● ● ●●●● ●●● ● ● ● ●●● ● ● ●●●● ● ●● ● ●● ● ● ● ● ●● ● ●●● −2 −1 2 ● 2 ● ● ● −2 −1 0 1 2 3 0 1 2 iris (Model−based) 0.9039 Clustering Accuracy 2 3 0.6 0.4 0.2 ● ● ● 0.0 1 0 PC2 −1 −1 PC1 ● ●● ●●● ● ●●●● ●●● ● ● ● ●●● ● ● ●●●● ● ●● ● ●● ● ● ● ● ●● ● ●●● −2 −2 PC1 ● ● −3 −3 0.8 −3 −2 −1 0 1 2 3 k−Means Model−based PC1 Figure 13.2: Iris Clustering Plots — Serial 13.3.2 Iris in GBD Code The demo code for the GBD Iris example can be found with the package demos, and executed via: Shell Command ✞ # ## At the shell prompt , run the demo with 4 processors by # ## ( Use Rscript . exe for windows system ) mpiexec - np 4 Rscript -e " demo ( iris _ gbd , ’ pbdDEMO ’ , ask =F , echo = F ) " ✝ Sample Outputs Running this script should produce an output that looks something like the following: ☎ ✆