Skip to content

Instantly share code, notes, and snippets.

@yunho0130
Created April 16, 2019 04:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yunho0130/47a9c186a027034b0ef948747620d5e5 to your computer and use it in GitHub Desktop.
Save yunho0130/47a9c186a027034b0ef948747620d5e5 to your computer and use it in GitHub Desktop.
install.packages("kohonen")
require(kohonen)
data <- read_csv("mac_backup/# Ph_d/19-01/파이낸스인텔리전스(IIE7561-01)/week07/2LendingClub_data_preperation.csv")
data_matrix <- as.matrix(scale(data))
mygrid = somgrid(3, 4, "hexagonal")
som_model <- supersom(data_matrix, grid = mygrid)
som_model$unit.classif
write.table(som_model$unit.classif, "mac_backup/# Ph_d/19-01/파이낸스인텔리전스(IIE7561-01)/week07/result.txt", sep=",", row.names = TRUE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment