| somregs {somspace} | R Documentation |
Classify SOM into regions
Description
somregs applies hierarchical cluster analysis to the Self-Organizing Map
to form regions with homogeneous characteristics (classification scheme).
Usage
somregs(x, nregions, ...)
Arguments
x |
A |
nregions |
The maximum number of classifications schemes to be determined starting from 2. |
... |
Other arguments passed to methods from |
Details
nregions must be at least two, i.e., a classification scheme with two regions, and smaller than
the number of SOM nodes. In the latter case, each SOM node corresponds to a region.
The resulting regs object can be plotted by plot and plot_ts.
If plot is used, three additional arguments are needed; a set with the classification schemes
that will be ploted, number of rows and number of columns of the plotted panels.
plot_ts plots all the time series of a given classification scheme.
Value
A regs object, which contains:
A summary
data.tablewhich updates thesomspobject with the region ids of all classification schemes up tonregions. Each different classification scheme is stored as an individual region, e.g.,regions.2,regions.3, etc. to their corresponding winning unit, the number of points of each node, as well as the median latitude and longitude of each node coordinates and their standard deviation.The original time series which created the SOM as a
data.table, as insomsp.
See Also
Examples
dummy <- owda[Time <= 1600]
inp_som <- sominp(dummy)
my_som <- somspa(inp_som, rlen = 100, grid = somgrid(4, 4, "hexagonal"))
my_regions <- somregs(my_som, nregions = 9)
plot(my_regions, regions = c(2, 4, 6, 8), nrow = 2, ncol = 2)
plot_ts(my_regions, n = 4)