Description Usage Arguments Details Value Author(s) See Also
Generic function for fitting a Self-Organising Map to some data, using a batch algorithm.
1 2 3 4 5 6 | batchsom(data, somgrid, init=c("pca","random"), prototypes, weights,
mode = c("continuous","stepwise"), min.radius, max.radius,
steps, decrease = c("power", "linear"), max.iter,
kernel = c("gaussian", "linear"), normalised,
assignment = c("single", "heskes"), cut = 1e-07,
verbose = FALSE, keepdata = TRUE, ...)
|
data |
the data to which the SOM will be fitted. Acceptable data type depend on the available methods, see details |
somgrid |
an object of class |
init |
the initialisation method (defaults to |
prototypes |
Initial values for the
prototypes (the exact representation of the prototypes depends on
the data type). If missing, initial prototypes are chosen via
the method specified by the |
weights |
optional weights for the data points |
mode |
annealing mode:
|
min.radius |
the minimum neighbourhood influence radius. If
missing, the value depends on the one of |
max.radius |
the maximal neighbourhood influence radius. If missing two third of the prior structure diameter plus one |
steps |
the number of radii to use during annealing |
decrease |
the radii generating formula ( |
max.iter |
maximal number of epochs for one radius in the
|
kernel |
the kernel used to transform distances in the prior structure into influence coefficients |
normalised |
switch for normalising the neighbouring
interactions. Has no influence with the |
assignment |
the assignment method used to compute the best matching unit (BMU) of an observation during training:
|
cut |
minimal value below wich neighbouring interactions are not take into account |
verbose |
switch for tracing the fitting process |
keepdata |
if |
... |
additional arguments to be passed to methods |
In yasomi, the batchsom
generic function is implemented by three methods
which provide Self-Organising Map fitting for three distinct data
representation:
the default implementation batchsom.default
is
used when the dataset data
is given by a matrix or a data
frame: it provides a standard batch SOM
implementation;
for a dataset given by all the pairwise dissimilarities
between the observations (data
is an object of class
"dist"
from the proxy
package), the method
batchsom.dist
implements
the relational Self-Organising Map algorithm. It is
based on prototypes represented by virtual linear combination of the
original data points;
when the dataset is given as a kernel matrix (data
is an
object of class "kernelmatrix"
, see
as.kernelmatrix
), the method
batchsom.kernelmatrix
implements the
batch kernel Self-Organising Map algorithm. In this
case, it is assumed that data
contains all pairwise evaluation
of a positive semi-definite kernel function and a batch SOM is
performed (implicitly) in the kernel induced feature space.
If the initial value of prototypes
is not provided, it is
obtained by a call to an initialisation method
specified via the init
parameter (of character type). All
batchsom
methods accept the "random"
value for init
(see sominit.random
for the corresponding
generic random initialisation method) as well as
the "pca"
value which covers ordered initialisation methods inspired by
principal component analysis in the standard vector case (see
sominit.pca
for the corresponding generic method).
An object of class "som"
, a list with components including
somgrid |
as in the arguments to |
prototypes |
a representation of the prototypes that depends on the actual method |
classif |
a vector of integer indicating to which unit each observation has been assigned |
errors |
a vector containing the evolution of the quantisation error during the fitting process |
control |
a list containing all the parameters used to fit the SOM |
data |
the original data if the function is called with
|
weights |
the weights of the data points if the function is called with
|
The list will generally contain additional components specific to each
implementation. The returned object will also generally have another
class more specific than "som"
.
Fabrice Rossi
See sominit.pca
and sominit.random
for some control on the initial configuration of the prototypes, som.tune
for the optimisation of some magic
parameters (such as the radii), umatrix
and
distance.grid
for visual analysis of the distances
between the prototypes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.