somregs | R Documentation |
somregs
applies hierarchical cluster analysis to the Self-Organizing Map
to form regions with homogeneous characteristics (classification scheme).
somregs(x, nregions, ...)
x |
A |
nregions |
The maximum number of classifications schemes to be determined starting from 2. |
... |
Other arguments passed to methods from |
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.
A regs
object, which contains:
A summary data.table
which updates the somsp
object with the region ids of all classification schemes
up to nregions
. 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 in somsp
.
somsp
somspa
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.