Rsomoclu.train | R Documentation |
A function call to Somoclu to train the Self Organizing Map.
Rsomoclu.train(input_data, nEpoch, nSomX, nSomY, radius0, radiusN, radiusCooling, scale0, scaleN, scaleCooling, kernelType, mapType, gridType, compactSupport, neighborhood, stdCoeff, codebook, vectDistance)
input_data |
input data, matrix format |
nEpoch |
Maximum number of epochs |
nSomX |
Number of columns in map (size of SOM in direction x) |
nSomY |
Number of rows in map (size of SOM in direction y) |
radius0 |
Start radius (default: half of the map in direction min(x,y)) |
radiusN |
End radius (default: 1) |
radiusCooling |
Radius cooling strategy: linear or exponential (default: linear) |
scale0 |
Starting learning rate (default: 1.0) |
scaleN |
Finishing learning rate (default: 0.01) |
scaleCooling |
Learning rate cooling strategy: linear or exponential (default: linear) |
kernelType |
Kernel type 0: Dense CPU 1: Dense GPU 2: Sparse CPU (default: 0) |
mapType |
Map type: planar or toroid (default: "planar") |
gridType |
Grid type: square or hexagonal (default: "rectangular") |
compactSupport |
Compact support for Gaussian neighborhood, (default:TRUE) |
neighborhood |
Neighborhood function: gaussian or bubble (default: "gaussian") |
codebook |
initial codebook, (default:NULL) |
stdCoeff |
The coefficient in the Gaussian neighborhood function exp(-||x-y||^2/(2*(coeff*radius)^2)), (default:0.5) |
vectDistance |
the vector distance function "norm-3", "norm-6", "norm-2"(same as default) "norm-inf", is supported with kerneltype = 0 only , (default:euclidean) |
a list including elements
codebook |
the codebook |
globalBmus |
global Best Matching Unit matrix |
uMatrix |
uMatrix |
Peter Wittek, Shichao Gao
Peter Wittek, Shi Chao Gao, Ik Soo Lim, Li Zhao (2017). Somoclu: An Efficient Parallel Library for Self-Organizing Maps. Journal of Statistical Software, 78(9), 1-21. doi:10.18637/jss.v078.i09.
library('Rsomoclu') data("rgbs", package = "Rsomoclu") input_data <- rgbs input_data <- data.matrix(input_data) nSomX <- 10 nSomY <- 10 nEpoch <- 10 radius0 <- 0 radiusN <- 0 radiusCooling <- "linear" scale0 <- 0 scaleN <- 0.01 scaleCooling <- "linear" kernelType <- 0 mapType <- "planar" gridType <- "rectangular" compactSupport <- FALSE codebook <- NULL neighborhood <- "gaussian" stdCoeff <- 0.5 vectDistance <- "euclidean" res <- Rsomoclu.train(input_data, nEpoch, nSomX, nSomY, radius0, radiusN, radiusCooling, scale0, scaleN, scaleCooling, kernelType, mapType, gridType, compactSupport, neighborhood, stdCoeff, codebook, vectDistance) res$codebook res$globalBmus res$uMatrix library('kohonen') sommap = Rsomoclu.kohonen(input_data, res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.