Description Usage Format Details Source Examples
~~ A concise (1-5 lines) description of the dataset. ~~
1 |
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
This dataset is used to illustrate SOM with categorical and numerical data.
Jeffrey S. Simonoff Analyzing Categorical Data
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 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.