Clustering | R Documentation |
This function serves to clustering data analysis using diverse methods and ploting diverses graphs
Clustering(Y, ClustMeth = "hierarchical", k = 3, Sotadismethod = "euclidean", Pdismethod = "euclidean", Cdismethod = "euclidean", Ddismethod = "euclidean", Hdismethod = "euclidean", Hmethod = "ward.D2", Graph = T, VarCart = F, IndCart = F)
Y |
a numeric matrix or a data frame with all numeric columns (Ex:consumers scores) |
ClustMeth |
Clustering method that must be "hierarchical", "diana", "kmeans", "sota", "pam", "clara" or "som" |
k |
integer, the number of clusters. It is required that 0<k<n where n is the number of observations (i.e., n = nrow(x)) |
Sotadismethod |
character string specifying the metric to be used for calculating dissimilarities between observations for Sota method.It could be "euclidean" or "correlation" |
Pdismethod |
character string specifying the metric to be used for calculating dissimilarities between observations for PAM method.It could be "euclidean" or "manhattan" |
Cdismethod |
character string specifying the metric to be used for calculating dissimilarities between observations for Clara method.It could be "euclidean","manhattan" or "jaccard" |
Ddismethod |
character string specifying the metric to be used for calculating dissimilarities between observations for Diana method.It could be "euclidean" or "manhattan" |
Hdismethod |
The method to calculate a dissimilarity structure as produced by dist for hierarchical method.It could be :"aitchison", "euclidean", "maximum", "manhattan", "canberra","binary" or "minkowski" |
Hmethod |
the agglomeration method to be used ,should be "single", "complete", "average", "mcquitty", "ward.D", "ward.D2", "centroid" or "median" |
Graph |
TRUE if you want to visualize the dendrogram (only for Hierarchical and Diana methods ) |
VarCart |
TRUE if you want to visualize Variables's representation |
IndCart |
TRUE if you want to visualize Distribution of consumers |
Graph,IndCart,VarCart,classes
library(ClusteringR) cl=Clustering(Y=t(hedo),ClustMeth='hierarchical', k=3,Hdismethod='euclidean',Hmethod="ward.D2", Graph=FALSE,VarCart=FALSE,IndCart=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.