Hierarchical.sim.noise | R Documentation |
A vector of similarity measures between pairs of clusterings perturbed with random noise is computed for a given number of clusters. The variance of the added gaussian noise, estimated from the data as the perc percentile of the standard deviations of the input variables, the percentile itself, the similarity measure and the type of hierarchical clustering may be selected.
Hierarchical.sim.noise(X, c = 2, nnoisy = 100, perc = 0.5, s = sFM,
distance = "euclidean", hmethod = "ward.D")
X |
matrix of data (variables are rows, examples columns) |
c |
number of clusters |
nnoisy |
number of pairs of noisy data |
perc |
percentile of the standard deviations to be used for the added gaussian noise (def. 0.5) |
s |
similarity function to be used. It may be one of the following: - sFM (Fowlkes and Mallows) - sJaccard (Jaccard) - sM (matching coefficient) (default Fowlkes and Mallows) |
distance |
it must be one of the two: "euclidean" (default) or "pearson" (that is 1 - Pearson correlation) |
hmethod |
the agglomeration method to be used. This parameter is used only by the hierarchical clustering algorithm. This should be one of the following: "ward.D", "single", "complete", "average", "mcquitty", "median" or "centroid", according of the hclust method of the package stats. |
vector of the computed similarity measures (length equal to nnoisy)
Giorgio Valentini valentini@di.unimi.it
Hierarchical.sim.projection
, Hierarchical.sim.resampling
, perturb.by.noise
library("clusterv")
# Synthetic data set generation
M <- generate.sample6 (n=20, m=10, dim=600, d=3, s=0.2);
# computing a vector of similarity indices with 2 clusters:
v2 <- Hierarchical.sim.noise(M, c = 2, nnoisy = 20, s = sFM)
# computing a vector of similarity indices with 3 clusters:
v3 <- Hierarchical.sim.noise(M, c = 3, nnoisy = 20, s = sFM)
# computing a vector of similarity indices with 2 clusters using the Jaccard index
v2J <- Hierarchical.sim.noise(M, c = 2, nnoisy = 20, s = sJaccard)
# 2 clusters using the Jaccard index and Pearson correlation
v2JP <- Hierarchical.sim.noise(M, c = 2, nnoisy = 20, s = sJaccard, distance="pearson")
# 2 clusters using 0.95 percentile (more noise)
v095 <- Hierarchical.sim.noise(M, c = 2, nnoisy = 20, s = sFM, perc=0.95)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.