Last data update: 2014.03.03
|
R: Jordan Fast Spectral Algorithm
FastSpectralNJW | R Documentation |
Jordan Fast Spectral Algorithm
Description
Perform the Jordan spectral algorithm for large databases. Data are sampled, using K-means with Elbow criteria, before being classified.
Usage
FastSpectralNJW(data, nK = NULL, Kech = 2000, StopCriteriaElbow = 0.97,
neighbours = 7, method = "", nb.iter = 10, uHMMinterface = FALSE,
console = NULL, tm = NULL)
Arguments
data |
numeric matrix or dataframe.
|
nK |
number of clusters desired. If NULL, optimal number of clusters will be computed using gap criteria.
|
Kech |
maximum number of representative points in sampled data.
|
StopCriteriaElbow |
maximum (minimum ?) de variance expliquees des points representatifs souhaite.
|
neighbours |
number of neighbours considered for the computation of local scale parameters.
|
method |
string specifying the spectral classification method desired, either "PAM" (for spectral kmedoids) or "" (for "spectral kmeans").
|
nb.iter |
number of iterations.
|
uHMMinterface |
logical indicating whether the function is used via the uHMMinterface.
|
console |
frame of the uHMM interface in which messages should be displayed (only if uHMMinterface=TRUE).
|
tm |
a one row dataframe containing text to display in the uHMMinterface (only if uHMMinterface=TRUE).
|
Details
Algorithme de Jordan pour un grand jeu de donnees : echantillonage puis spectral
Value
The function returns a list containing:
sim |
similarity matrix of representative points, multiplied by its transpose (ZPGaussianSimilarity ).
|
label |
vector of cluster sequencing.
|
gap |
number of clusters.
|
labelElbow |
vector of prototype sequencing.
|
vpK |
matrix containing, in columns, the K first normalised eigen vectors of the data similarity matrix.
|
valp |
vector containing the K first eigen values of the data similarity matrix.
|
echantillons |
matrix of prototypes coordinates.
|
label.echantillons |
vector containing the cluster of each prototype.
|
numSymbole |
vector containing the nearest prototype of each data item.
|
See Also
KmeansAutoElbow ZPGaussianSimilarity knn
silhouette dunn connectivity dist
Examples
x=(runif(1000)*4)-2;y=(runif(1000)*4)-2
keep<-which((x**2+y**2<0.5)|(x**2+y**2>1.5**2 & x**2+y**2<2**2 ))
data<-data.frame(x,y)[keep,]
cl<-FastSpectralNJW(data,2)
plot(data,col=cl$label)
Results
|