get.cluster: Extract data and prototype for a specified class.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Extract data and prototype for a specified class. The function return an object of class 'som.cluster'.

Usage

1
get.cluster(object, class.number)

Arguments

object

a som object

class.number

integer representing the number id of the class.

Details

The function allow to browse a specific class.

Value

object of class {som.cluster} : a list with several components:

data

subset of the model.matrix of the model that belong to the class

weights

prototype of the class

class.number

integer representing the number id of the class

withinss

mean of within sum of squares in the class

ss

within sum of squares for each data row in the class

Author(s)

David Gohel

See Also

som plot.som.cluster summary.som.cluster biplot.som

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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)

x <- get.cluster( lcrabs.som , 1)
x
plot( x )

harrysouthworth/kohonen documentation built on May 17, 2019, 3:03 p.m.