library(caret) library(CAST) library(dplyr) model_sf <- readRDS(file = "C:/Users/Alice/Uni/Projekte/GEDI/data/modeling/model_sf.rds")
set.seed(1) train_sf <- sample_frac(model_sf, size = 0.7) st_geometry(train_sf) <- NULL test_sf <- model_sf[!model_sf$ID %in% train_sf$ID,] st_geometry(test_sf) <- NULL
pred <- train_sf[,c(which(colnames(train_sf) == "S1_S1") : which(colnames(train_sf) =="S2_NDVI"))] resp <- train_sf$pai mod <- train(pred, resp, method = "ranger", num.trees = 150, importance = "impurity") saveRDS(mod, file = "C:/Users/Alice/Uni/Projekte/GEDI/data/modeling/mod.rds")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.