Kmeans.sim.projection | R Documentation |
A vector of similarity measures between pairs of clusterings perturbed with random projections is computed for a given number of clusters. The dimension of the projected data, the type of randomized map and the similarity measure may be selected.
Kmeans.sim.projection(X, c = 2, nprojections = 100, dim = 2, pmethod = "PMO",
scale = TRUE, seed = 100, s = sFM, distance = "euclidean", hmethod = "ward.D")
X |
matrix of data (variables are rows, examples columns) |
c |
number of clusters |
nprojections |
number of pairs of projected data |
dim |
dimension of the projected data |
pmethod |
projection method. It must be one of the following: - "RS" (random subspace projection) - "PMO" (Plus Minus One random projection) - "Norm" (normal random projection) - "Achlioptas" (Achlioptas random projection) |
scale |
if TRUE randomized projections are scaled (default) |
seed |
numerical seed for the random generator |
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 |
actually only the euclidean distance is available "euclidean" (default) |
hmethod |
parameter used for internal compatibility. |
vector of the computed similarity measures (length equal to nprojections)
Giorgio Valentini valentini@di.unimi.it
Kmeans.sim.resampling
, Kmeans.sim.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 <- Kmeans.sim.projection(M, c = 2, nprojections = 20, dim = 200,
pmethod = "PMO", s = sFM)
# computing a vector of similarity indices with 3 clusters:
v3 <- Kmeans.sim.projection(M, c = 3, nprojections = 20, dim = 200,
pmethod = "PMO", s = sFM)
# computing a vector of similarity indices with 2 clusters using the Jaccard index
v2J <- Kmeans.sim.projection(M, c = 2, nprojections = 20, dim = 200,
pmethod = "PMO", s = sJaccard)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.