Multiple.Random.PAM | R Documentation |
Multiple Random Partition Around Medoids (PAM) clusterings are computed using random projections of data.
The pam
function of the package cluster
is used as implementation of the base PAM algorithm.
It assumes that the label of the examples are integers starting from 1 to ncol(M).
Several randomized maps may be used: RS, PMO, Normal and Achlioptas random projections.
Multiple.Random.PAM(M, dim, pmethod = "PMO", c = 3, n = 50, scale = TRUE,
seed = -1, distance = "euclidean")
M |
matrix of data: rows are variables and columns are examples |
dim |
subspace dimension |
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) |
c |
number of clusters |
n |
number of RS projections |
scale |
if TRUE randomized projections are scaled (default) |
seed |
numerical seed for the random generator |
distance |
it must be one of the two: "euclidean" (default) or "pearson" (that is 1 - Pearson correlation) |
a list of the n clusterings obtained by the PAM algorithm clustering. Each clustering is a list of vectors, and each vector represents a single cluster. The elements of the vectors are integers that corresponds to the number of the columns (examples) of the matrix M of the data.
Giorgio Valentini valentini@di.unimi.it
# Multiple (20) PAM clusterings using Normal projections.
M <- generate.sample0(n=10, m=2, sigma=2, dim=800)
l.norm <- Multiple.Random.PAM (M, dim=100, pmethod="Norm", c=3, n=20)
# The same as above, using Random Subspace projections.
l.RS <- Multiple.Random.PAM (M, dim=100, pmethod="RS", c=3, n=20)
# The same as above, using PMO projections, but with the number of clusters set to 7
l.RS.PMO <- Multiple.Random.PAM (M, dim=100, pmethod="PMO", c=7, n=20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.