Description Usage Arguments Details Value Note Author(s) See Also Examples
Update a som object, compute statitics and can also project a new dataset
1 | update.som(object, newdata)
|
object |
a som object |
newdata |
a data frame in which to interpret the variables of the som object. |
groups
, size
, withinss
are re-computed.
a som object.
This function is useful if you want to project a new dataset with the som object or if you have modified by the hand the weights
matrix.
David Gohel
som
learn
learnBatch
plot.som
summary.som
predict.som
biplot.som
getWeights
setWeights
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(MASS)
lcrabs <- log(crabs[, 4:8])
lcrabs.som <- som ( formula = ~ . , data = lcrabs
, neighborhood = "uniform"
, grid = grid ( xdim = 10 , ydim = 10 , type = "hexagonal" )
, weights.min = min (lcrabs), weights.max = max (lcrabs)
)
lcrabs.som <- learn( lcrabs.som , number.iter = 500 , max.alpha = 0.5, min.alpha = .001, max.rayon = 3 , step.eval.si = 50)
# see the counts' map with learning data
plot( lcrabs.som , "effectif", cex.label = 0)
# see the counts' map with new data
lcrabs.som <- update( lcrabs.som , newdata = lcrabs[1:20,] )
plot( lcrabs.som , "effectif", cex.label = 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.