Learn R Programming

DatabionicSwarm (version 1.1.0)

GeneratePswarmVisualization: Generates the Umatrix for Pswarm algorithm

Description

Generates the special case of the generalized Umatrix with the help of an unsupervised neural network (here self-organizing map). From the generalized Umatrix a topographic map with hypsometric tints can be derived. To see this visualization use plotTopographicMap of the package GeneralizedUmatrix.

Usage

GeneratePswarmVisualization(Data,ProjectedPoints,LC,PlotIt=FALSE,ComputeInR=FALSE)

Arguments

Data

[1:n,1:d] array of data: n cases in rows, d variables in columns

ProjectedPoints

matrix, ProjectedPoints[1:n,1:2] n by 2 matrix containing coordinates of the Projection: A matrix of the fitted configuration. see output of Pswarm for further details

LC

size of the grid c(Lines,Columns), number of Lines and Columns automatic calculated by setGridSize in Pswarm

Sometimes is better to choose a different grid size, e.g. to to reduce computional effort contrary to SOM, here the grid size defined only the resolution of the visualizations The real grid size is predfined by Pswarm, but you may choose a factor x*res$LC if you so desire. Therefore, The resulting grid size is given back in the Output.

PlotIt

Optional, default(FALSE), If TRUE than uses plotTopographicMap of the package GeneralizedUmatrix

ComputeInR

Optional, =TRUE: Rcode, =FALSE C++ implementation

Value

list of

Bestmatches

matrix [1:n,1:2], BestMatches of the Umatrix, contrary to ESOM they are always fixed, because predefined by GridPoints.

Umatrix

matrix [1:Lines,1:Columns],

WeightsOfNeurons

array [1:Lines,1:Columns,1:d], d is the dimension of the weights, the same as in the ESOM algorithm

GridPoints

matrix [1:n,1:2],quantized projected points: projected points now lie on a predefined grid.

LC

c(Lines,Columns), normally equal to grid size of Pswarm, sometimes it a better or a lower resolution for the visualization is better. Therefore here the grid size of the neurons is given back.

Details

DBS is a flexible and robust clustering framework that consists of three independent modules. The first module is the parameter-free projection method Pswarm Pswarm, which exploits the concepts of self-organization and emergence, game theory, swarm intelligence and symmetry considerations. The second module is a parameter-free high-dimensional data visualization technique, which generates projected points on a topographic map with hypsometric colors GeneratePswarmVisualization, called the generalized U-matrix. The third module is a clustering method with no sensitive parameters DBSclustering. The clustering can be verified by the visualization and vice versa. The term DBS refers to the method as a whole.

see chapter 8 of [Thrun, 2018] for Pswarm

chapter 5.3 of [Thrun, 2018] for generalized Umatrix and especially the sESOM4BMUs algorithm.

References

[Thrun, 2018] Thrun, M. C.: Projection Based Clustering through Self-Organization and Swarm Intelligence, doctoral dissertation 2017, Springer, Heidelberg, ISBN: 978-3-658-20539-3, https://doi.org/10.1007/978-3-658-20540-9, 2018.

See Also

Pswarm and plotTopographicMap and GeneralizedUmatrix of the package GeneralizedUmatrix

Examples

Run this code
# NOT RUN {
data("Lsun3D")
Data=Lsun3D$Data
Cls=Lsun3D$Cls
InputDistances=as.matrix(dist(Data))

# }
# NOT RUN {
res=Pswarm(InputDistances)
resUmatrix=GeneratePswarmVisualization(Data,res$ProjectedPoints,res$LC)
library(GeneralizedUmatrix)
plotTopographicMap(resUmatrix$Umatrix,resUmatrix$Bestmatches,Cls)
# }
# NOT RUN {
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab