Learn R Programming

GeneralizedUmatrix

Table of Contents

1. Introduction
2. Installation
3. Additional Ressources
4. References

1. Introduction

Dimensionality Reduction methods are either manifold learning approaches or methods of projection. Projection methods should be prefered if the goal is the visualization of cluster structures [Thrun, 2018]. Two-dimensional projections are visualized as scatter plot. The Johnson–Lindenstrauss lemma states that in such a case the low-dimensional similarities does not represent high-dimensional distances coercively (details in [Thrun/Ultsch,2018]. To solve this problem the high-dimensional distances can be visualized in the two-dimensional projection as 3D landscape of a topographic map with hypsometric tints [Thrun, 2018; Ultsch/Thrun, 2017; Thrun et al., 2016].

The GeneralizedUmatrix package allows to

  • Calculate Generalized Umatrix with ESOM: Calcuation of the Umatrix with emergent self organizing map (ESOM).
  • Visualize Umatrix as 3D landscape: Visualization of the Umatrix as topographic map with hypsometric tints.

The 3D topographic map of a 2D projection visualizes projection errors, where neighboring projected points in a 2D scatter plot are not similar to each other in the high-dimensional space. The U-matrix visualizes these errors in a topographic map as landscape, where similar points are represented in a valley, dissimilar points are separated by mountains and thus non-structured/chaotic neighborhoods are represented as hilly area. The visualization can be used both for the interactive identification of cluster structures by a human user or automatized by taking decisions boundaries based on mountain ridges.

Use a projection method of choice to project the high dimensional data into 2 dimensions. Here cmdscale, a classical MDS algorithm is used.

data(Chainlink)
Data=Chainlink$Data
Cls=Chainlink$Cls

InputDistances = as.matrix(dist(Data))
model = cmdscale(
  d = InputDistances, k = 2, eig = TRUE, add = FALSE, x.ret = FALSE
)
ProjectedPoints = as.matrix(model$points)

Calculate generalized Umatrix

genUmatrix = GeneralizedUmatrix(Data, ProjectedPoints)

Plot topographic map of the Umatrix

plotTopographicMap(genUmatrix$Umatrix, 
                   genUmatrix$Bestmatches, 
                   NoLevels = 10)

Installation

Installation using CRAN

Install automatically with all dependencies via

install.packages("GeneralizedUmatrix",dependencies = T)

Installation using Github

Please note, that dependecies have to be installed manually.

remotes::install_github("Mthrun/GeneralizedUmatrix")

Installation using R Studio

Please note, that dependecies have to be installed manually.

Tools -> Install Packages -> Repository (CRAN) -> GeneralizedUmatrix

Additional Ressources

Tutorial Examples

The tutorial with several examples can be found on in the vignette on CRAN:

https://cran.r-project.org/web/packages/GeneralizedUmatrix/vignettes/GeneralizedUmatrix.html

Manual

The full manual for users or developers is available here: https://cran.r-project.org/web/packages/GeneralizedUmatrix/GeneralizedUmatrix.pdf

References

[Thrun/Ultsch, 2020] Thrun, M. C., & Ultsch, A.: Uncovering High-Dimensional Structures of Projections from Dimensionality Reduction Methods, MethodsX, Vol. 7, pp. 101093, DOI https://doi.org/10.1016/j.mex.2020.101093, 2020.

[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.

[Ultsch/Thrun, 2017] Ultsch, A., & Thrun, M. C.: Credible Visualizations for Planar Projections, in Cottrell, M. (Ed.), 12th International Workshop on Self-Organizing Maps and Learning Vector Quantization, Clustering and Data Visualization (WSOM), IEEE Xplore, France, 2017.

[Thrun et al., 2016] Thrun, M. C., Lerch, F., Loetsch, J., & Ultsch, A.: Visualization and 3D Printing of Multivariate Data of Biomarkers, in Skala, V. (Ed.), International Conference in Central Europe on Computer Graphics, Visualization and Computer Vision (WSCG), Vol. 24, Plzen, http://wscg.zcu.cz/wscg2016/short/A43-full.pdf, 2016.

Citation

Please use the following citation:

Thrun, M. C., & Ultsch, A: Uncovering High-Dimensional Structures of Projections from Dimensionality Reduction Methods, MethodsX Vol. 7 pp. 101093, DOI: 10.1016/j.mex.2020.101093, 2020.

Copy Link

Version

Install

install.packages('GeneralizedUmatrix')

Monthly Downloads

727

Version

1.3.1

License

GPL-3

Maintainer

Michael Thrun

Last Published

January 29th, 2025

Functions in GeneralizedUmatrix (1.3.1)

UniqueBestMatchingUnits

UniqueBestMatchingUnits
addRowWiseC

intern function
ReduceToLowLand

ReduceToLowLand
NormalizeUmatrix

Normalize Umatrix
XYcoords2LinesColumns

XYcoords2LinesColumns(X,Y) Converts points given as x(i),y(i) coordinates to integer coordinates Columns(i),Lines(i)
upscaleUmatrix

Upscale a Umatrix grid
TopviewTopographicMap

Top view of the topographic map in 2D
Uheights4Data

Uheights4Data
setdiffMatrix

setdiffMatrix shortens Matrix2Curt by those rows that are in both matrices.
UmatrixColormap

U-Matrix colors
sESOM4BMUs

simplified ESOM
trainstepC2

internal function for s-esom
trainstepC

internal function for s-esom
plotTopographicMap

Visualizes the generalized U-matrix in 3D
Chainlink

Chainlink is part of the Fundamental Clustering Problem Suit (FCPS) [Thrun/Ultsch, 2020].
DefaultColorSequence

Default color sequence for plots
Delta3DWeightsC

intern function
EsomNeuronsAsList

Converts wts data (EsomNeurons) into the list form
ListAsEsomNeurons

Converts List to WTS
CalcUstarmatrix

Calculate the U*matrix for a given Umatrix and Pmatrix.
ExtendToroidalUmatrix

Extend Toroidal Umatrix
GeneratePmatrix

Generates the P-matrix
LowLand

LowLand
GeneralizedUmatrix-package

tools:::Rd_package_title("GeneralizedUmatrix")
GeneralizedUmatrix

Generalized U-Matrix for Projection Methods published in [Thrun/Ultsch, 2020]