- som
kohonen
object, a SOM created by the kohonen::som
function.
- type
character, the plot type. The default "Hitmap" is a population
map. "Cloud" plots the observations as a scatterplot within each cell (see
Details). "UMatrix" plots the average distance of each cell to its
neighbors, on a color scale. "Circular" (barplot), "Barplot", "Boxplot",
"Radar" and "Line" are for numeric variables. "Color" (heat map) is for a
single numeric variable. "Pie" (pie chart) and "CatBarplot" are for a
single categorical (factor) variable.
- data
data.frame containing the variables to plot. This is typically
not the training data, but rather the unscaled original data, as it is
easier to read the results in the original units, and this allows to plot
extra variables not used in training. If not provided, the training data is
used.
- variables
character vector containing the names of the variable(s) to
plot. See Details.
- superclass
integer vector, the superclass of each cell of the SOM.
- obsNames
character vector, names of the observations to be displayed
when hovering over the cells of the SOM. Must have a length equal to the
number of data rows. If not provided, the row names of data will be used.
- scales
character, controls the scaling of the variables on the plot.
See Details.
- values
character, the type of value to be displayed. The default
"mean" uses the observation means (from data) for each cell. Alternatively,
"median" uses the observation medians for each cell, and "prototypes" uses
the SOM's prototypes values.
- size
numeric, plot size, in pixels. Default 400.
- palsc
character, the color palette used to represent the superclasses
as background of the cells. Default is "Set3". Can be "viridis", "grey",
"rainbow", "heat", "terrain", "topo", "cm", or any palette name of the
RColorBrewer package.
- palvar
character, the color palette used to represent the variables.
Default is "viridis", available choices are the same as for palsc.
- palrev
logical, whether color palette for variables is reversed.
Default is FALSE.
- showAxes
logical, whether to display the axes (for "Circular",
"Barplot", "Boxplot", "Star", "Line", "CatBarplot"), default TRUE.
- transparency
logical, whether to use transparency when focusing on a
variable, default TRUE.
- boxOutliers
logical, whether outliers in "Boxplot" are displayed,
default TRUE.
- showSC
logical, whether to display superclasses as labels in the
"Color" and "UMatrix" plots, default TRUE.
- pieEqualSize
logical, whether "Pie" should display pies of equal size.
The default FALSE displays pies with areas proportional to the number of
observations in the cells.
- showNames
logical, whether to display the observations names in a box
below the plot.
- legendPos
character, whether and where to display the legend (if
applicable). Possible values are "beside", "below" or "none".
- legendFontsize
numeric, font size to use for the legend, and for the
tooltip information of the "Cloud" plot. Default is 14.
- cloudType
character, for "Cloud" type, controls how the point
coordinates are computed, see Details.
- cloudSeed
numeric, for "random Cloud" type, seed for the pseudo-random
placement of the points. If NA (the default), no seed will be set.
- elementId
character, user-defined elementId of the widget. Can be
useful for user extensions when embedding the result in an html page.