if (FALSE) {
library(vmsae)
library(sf)
# this function is time consuming for the first run
install_environment()
load_environment()
acs_data <- read_sf(system.file("example", "mo_county.shp", package = "vmsae"))
W <- readRDS(system.file("example", "W.Rds", package = "vmsae"))
loss <- train_vae(W = W,
GEOID = acs_data$GEOID,
model_name = "test",
save_dir = tempdir(),
n_samples = 1000, # set to larger values in practice, e.g. 10000.
batch_size = 256,
epoch = 1000) # set to larger values in practice, e.g. 10000.
}
Run the code above in your browser using DataLab