braziltourism: ~~ data name/kind ... ~~

Description Usage Format Details Source Examples

Description

~~ A concise (1-5 lines) description of the dataset. ~~

Usage

1

Format

A data frame with 412 observations on the following 9 variables.

Age

a numeric vector

Sex

a factor with levels Female Male

Income

a numeric vector

Travel.cost

a numeric vector

Access.road

a numeric vector

Active

a numeric vector

Passive

a numeric vector

Logged.income

a numeric vector

Trips

a numeric vector

Details

This dataset is used to illustrate SOM with categorical and numerical data.

Source

Jeffrey S. Simonoff Analyzing Categorical Data

Examples

1
2
3
4
5
6
7
8
9
braziltourism2 <- braziltourism
braziltourism2[, sapply( braziltourism2 , is.numeric ) ] <- sapply ( braziltourism2 [, sapply( braziltourism2 , is.numeric ) ] , scale )
bt.som.init  <- som ( ~ Age + Sex + Income + Travel.cost + Active + Passive + Logged.income + Trips
	, data = braziltourism2
	, grid = grid ( xdim = 15 , ydim = 15 , type = "rectangular" ) 
	)
bt.som <- learn( bt.som.init , number.iter = 5000, max.alpha = 0.5, min.alpha = .001, step.eval.si = 100)
plot(bt.som, "energy")
plot(bt.som, "effectif", cex = .75 , cex.label = .0 )

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