KamadaKawai-class {dimRed} | R Documentation |
An S4 Class implementing the Kamada Kawai Algorithm for graph embedding.
Graph embedding algorithms se the data as a graph. Between the nodes of the graph exist attracting and repelling forces which can be modeled as electrical fields or springs connecting the nodes. The graph is then forced into a lower dimensional representation that tries to represent the forces betweent he nodes accurately by minimizing the total energy of the attracting and repelling forces.
fun
A function that does the embedding and returns a dimRedResult object.
stdpars
The standard parameters for the function.
Dimensionality reduction methods are S4 Classes that either be used
directly, in which case they have to be initialized and a full
list with parameters has to be handed to the @fun()
slot, or the method name be passed to the embed function and
parameters can be given to the ...
, in which case
missing parameters will be replaced by the ones in the
@stdpars
.
KamadaKawai can take the following parameters:
The number of dimensions, defaults to 2. Can only be 2 or 3
Reduce the graph to keep only the neares neighbors. Defaults to 100.
The distance function to determine the weights of the graph edges. Defaults to euclidean distances.
Wraps around layout_with_kk
. The parameters
maxiter, epsilon and kkconst are set to the default values and
cannot be set, this may change in a future release. The DimRed
Package adds an extra sparsity parameter by constructing a knn
graph which also may improve visualization quality.
Other dimensionality reduction methods: DRR-class
,
DiffusionMaps-class
,
DrL-class
, FastICA-class
,
FruchtermanReingold-class
,
HLLE-class
, Isomap-class
,
LLE-class
, MDS-class
,
PCA-class
,
dimRedMethod-class
,
kPCA-class
, nMDS-class
,
tSNE-class
dat <- loadDataSet("Swiss Roll", n = 500) kamada_kawai <- KamadaKawai() kk <- kamada_kawai@fun(dat, kamada_kawai@stdpars) plot(kk@data@data)