123456789101112131415161718192021222324 |
- #!/usr/bin/env Rscript
- library(cluster)
- library(mp)
- data <- read.csv2("../app/data/proj/projection_data.csv")
- m <- daisy(data)
- #Generate projections with geography information
- tsne_proj <- tSNE(m)
- lamp_proj <- lamp(m)
- saveRDS(tsne_proj, "../app/data/rds/proj_with_geography_tsne.rds")
- saveRDS(lamp_proj, "../app/data/rds/proj_with_geography_lamp.rds")
- #Generate projections without geography information
- data <- data[-c(1,2,3,4,5,6)]
- m <- daisy(data)
- tsne_proj <- tSNE(m)
- lamp_proj <- lamp(m)
- saveRDS(tsne_proj, "../app/data/rds/proj_no_geography_tsne.rds")
- saveRDS(lamp_proj, "../app/data/rds/proj_no_geography_lamp.rds")
|