#Get some data
data(iris)
s = sample(1:150, 100)
train_set = iris[s,1:4]
test_set = iris[-s,1:4]
# Create a GSOM Model
gsom_iris <- train.gsom(train_set, spreadfactor=0.75)
# Mapping
mapped_iris <- map.gsom(gsom_iris, test_set)
Run the code above in your browser using DataLab