daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Dec 15th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. library(cluster)
  2.  
  3. input_data = cbind(rnorm(200),
  4.                    rnorm(200))
  5. k = 6
  6.  
  7. clara_clusters1 = clara(input_data, k, medoids.x = FALSE)$clustering
  8. clara_clusters2 = clara(input_data, k, medoids.x = FALSE)$clustering
  9.  
  10. pam_clusters1 = pam(input_data, k, cluster.only = TRUE)
  11. pam_clusters2 = pam(input_data, k, cluster.only = TRUE)
  12.  
  13. print(clara_clusters1 - clara_clusters2)
  14. print(pam_clusters1 - pam_clusters2)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand