plot.somtune: Plot SOM parameter tuning results

Description Usage Arguments Details Warning Author(s) See Also Examples

Description

Visualise the results of parameter tuning for the SOM

Usage

1
2
3
## S3 method for class 'somtune'
plot(x, relative = TRUE,
sqrt.quant=!x$isquant, best.color="red", xlab, ylab, yaxs, legend.text, ...)

Arguments

x

an object of class somtune

relative

specifies whether the best (i.e., lowest) value of the criterion should be used as a baseline in the display (the default behaviour) or not

sqrt.quant

specifies whether the plot should display the quantisation error or its square root. When som.tune has been used with the quantisation error as the quality measure, the default is to show it directly, while is square root is used in other cases

best.color

gives the colour of the border of bar associated to the best configuration. Use NA to suppress this effect

xlab

a label for the x axis (see barplot)

ylab

a label for the y axis (see barplot)

yaxs

the style of axis interval calculation to be used for the y-axis (see par)

legend.text

a vector of text used to construct a legend for the plot (see barplot)

...

not used

Details

This function produces a barplot with the quantisation error of all the tested SOMs as well as an additional bar for an another error criterion if the quantisation error was not used to choose the best SOM. Most of the parameters have reasonable default values computed from the somtune object. The function tries to avoid superposition of the legend with the bars.

Warning

This function works only when one parameter is tuned by som.tune. It will not work in particular if random initialisation is used several times together with a parameter tuning.

Author(s)

Fabrice Rossi

See Also

som.tune and som.tunecontrol

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(iris)
# scaling
data <- scale(iris[1:4])

# a medium hexagonal grid
sg <- somgrid(xdim=15,ydim=15,topo="hex")

# choose a good SOM via Kaski and Lagus' error measure
tune.results <-
  som.tune(data,sg,som.tunecontrol(sg,criterion=error.kaskilagus))

# plot errors
plot(tune.results)

yasomi documentation built on May 2, 2019, 5:59 p.m.