if (FALSE) {
data(degelder)
mydata <- list(patterns = degelder$patterns,
CellVol = log(degelder$properties[,"cell.vol"]))
## custom distance function
require(Rcpp)
sourceCpp(system.file("Distances", "wcc.cpp", package = "kohonen"))
set.seed(7)
powsom <- supersom(data = mydata, grid = somgrid(6, 4, "hexagonal"),
dist.fcts = c("WCCd", "sumofsquares"),
keep.data = TRUE)
summary(powsom)
}
Run the code above in your browser using DataLab