Description Usage Arguments Details Note Author(s) See Also Examples
Produces a biplot corresponding to the som object and its data.
1 | biplot.som(object, type = "lines", cex = 0.75)
|
object |
a som object |
type |
character specifying the type of biplot : [lines | bar | boxplot | solid] |
cex |
character expansion of titles and legend. |
type = 'lines' : for each class, plot values and the associated prototype, type = 'solid' : for each class, plot the prototype as a solid polygon. type = 'stars' : for each class, plot the prototype as a star. type = 'boxplot' : plot a boxplot of the sums of squares (ss of the data in the class).
When type = 'lines', the plotting procedure is slow.
David Gohel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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)
#--- profil for each class ---#
biplot( lcrabs.som , type = "stars")
biplot( lcrabs.som , type = "lines")
biplot( lcrabs.som , type = "solid")
biplot( lcrabs.som , type = "boxplot")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.