plot.hdgsom: Plot hdgsom objects

Description Usage Arguments Author(s) Examples

View source: R/plot.hdgsom.r

Description

Plot growing self-organising maps, obtained from functions of the hdgsom package. Several types of plots are supported.

Usage

1
2
## S3 method for class 'hdgsom'
plot(x, type = "count", colors=NULL, dim = 0, main = "", ...)

Arguments

x

a hdgsom object

type

defines the type of the plot. Possible values are:
- training: shows the mean distance to the code of the best matching unit during the training.
- count: Graphical Representation of how many observations are put into each unit.
- property: properties of each unit can be calculated and shown in colour code. It can be used to visualise the similarity of one particular object to all units in the map, to show the mean similarity of all units and the objects mapped to them, etcetera
- distance: shows the mean distance of objects mapped to a unit to the codebook vector of that unit. The smaller the distances, the better the objects are represented by unit.
- predict: properties of the properties to be modelled can be shown similarly to the "property" plot.

dim

can be used if type is "property" to specifly which property should be plotted

colors

colors to be used to generate the plots. If set to NULL, the default colors will be used. Format: list(red, green, blue)
Examples:
colors = list(c(0.1, 0.9), c(0.1, 0.9), c(0.1, 0.9)) For gray scale colors = list(c(1.0, 0.0), c(0.0, 1.0), c(0.0, 0.0)) Red to green

main

changes the title of the plots

...

Collects further graphical parameters for the plot

Author(s)

Alex Hunziker

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
  # Get some Data
  data(iris)
  iris_d = iris[,1:4]
  
  # Train a hdgsom map
  hdgsom_map = train.hdgsom(iris_d, spreadFactor = 0.9)
  
  # Counts
  plot(hdgsom_map)
  
  # Properties
  plot(hdgsom_map, type = "property")
  
  # Training
  plot(hdgsom_map, type = "training")
  
  # Distances
  plot(hdgsom_map, type = "distance")

alecuba16/HDGSOM documentation built on April 11, 2020, 5:06 a.m.