List the RData in the folder - ntrees 500
setwd("C:/Users/01438475/Documents/GitHub/SamplingSchemeGuideline/Project Extension/Hyperparameter Tuning/Random Forest/Results RF")
ldf <- list() # creates a list
listRdata <- list.files(pattern = "*.RData")
loadRData <- function(fileName){
#loads an RData file, and returns it
load(fileName)
get(ls()[ls() != "fileName"])
}
for (k in 1:31){
data <- loadRData(paste0("C:/Users/01438475/Documents/GitHub/SamplingSchemeGuideline/Project Extension/Hyperparameter Tuning/Random Forest/Results RF/",listRdata[k]))
correct <- data[[1]]$results
results_hold <- as.matrix( correct )
results <- data.frame()
for (j in 1:10){
hold <- c()
results1 <- results_hold[ 1:136,]
results_hold <- results_hold[-c(1:136),]
for (i in 1:nrow(results1)){
hold <- c(hold, results1[i, ])
}
results1 <- matrix(hold, ncol = 9)
results <- rbind(results, results1 )
}
colnames(results) <- colnames(correct)
library(ggplot2)
plot_list = list()
p = ggplot(data = results, aes(x=mtry, y=RMSE)) +
geom_point(color = "steelblue") +
geom_boxplot(aes(group = mtry))+
labs(title = paste("RMSE",listRdata[k]),
subtitle = "with respect to mtry and minimum node size (facets)",
y = "RMSE", x = "mtry") +
facet_wrap(~ min.node.size)
paste(listRdata[k])
print(p)
}
## Warning: package 'ggplot2' was built under R version 4.2.3































rm(list=ls())
List the RData in the folder - ntrees 1000
setwd("C:/Users/01438475/Documents/GitHub/SamplingSchemeGuideline/Project Extension/Hyperparameter Tuning/Random Forest/Results RF")
ldf <- list() # creates a list
listRdata <- list.files(pattern = "*.RData")
loadRData <- function(fileName){
#loads an RData file, and returns it
load(fileName)
get(ls()[ls() != "fileName"])
}
for (k in 1:31){
data <- loadRData(paste0("C:/Users/01438475/Documents/GitHub/SamplingSchemeGuideline/Project Extension/Hyperparameter Tuning/Random Forest/Results RF/",listRdata[k]))
correct <- data[[2]]$results
results_hold <- as.matrix( correct )
results <- data.frame()
for (j in 1:10){
hold <- c()
results1 <- results_hold[ 1:136,]
results_hold <- results_hold[-c(1:136),]
for (i in 1:nrow(results1)){
hold <- c(hold, results1[i, ])
}
results1 <- matrix(hold, ncol = 9)
results <- rbind(results, results1 )
}
colnames(results) <- colnames(correct)
library(ggplot2)
plot_list = list()
p = ggplot(data = results, aes(x=mtry, y=RMSE)) +
geom_point(color = "steelblue") +
geom_boxplot(aes(group = mtry))+
labs(title = paste("RMSE",listRdata[k]),
subtitle = "with respect to mtry and minimum node size (facets)",
y = "RMSE", x = "mtry") +
facet_wrap(~ min.node.size)
paste(listRdata[k])
print(p)
}































rm(list=ls())
List the RData in the folder - ntrees 2000
setwd("C:/Users/01438475/Documents/GitHub/SamplingSchemeGuideline/Project Extension/Hyperparameter Tuning/Random Forest/Results RF")
ldf <- list() # creates a list
listRdata <- list.files(pattern = "*.RData")
loadRData <- function(fileName){
#loads an RData file, and returns it
load(fileName)
get(ls()[ls() != "fileName"])
}
for (k in c(1:15,17:31)){
data <- loadRData(paste0("C:/Users/01438475/Documents/GitHub/SamplingSchemeGuideline/Project Extension/Hyperparameter Tuning/Random Forest/Results RF/",listRdata[k]))
correct <- data[[3]]$results
results_hold <- as.matrix( correct )
results <- data.frame()
for (j in 1:10){
hold <- c()
results1 <- results_hold[ 1:136,]
results_hold <- results_hold[-c(1:136),]
for (i in 1:nrow(results1)){
hold <- c(hold, results1[i, ])
}
results1 <- matrix(hold, ncol = 9)
results <- rbind(results, results1 )
}
colnames(results) <- colnames(correct)
library(ggplot2)
plot_list = list()
p = ggplot(data = results, aes(x=mtry, y=RMSE)) +
geom_point(color = "steelblue") +
geom_boxplot(aes(group = mtry))+
labs(title = paste("RMSE",listRdata[k]),
subtitle = "with respect to mtry and minimum node size (facets)",
y = "RMSE", x = "mtry") +
facet_wrap(~ min.node.size)
paste(listRdata[k])
print(p)
}






























rm(list=ls())
Cluster
Coverage
GRTS
LHS
NSYS
SRS
Strat
Sys
Input results