Commit b653d269 authored by Romulo Pereira Goncalves's avatar Romulo Pereira Goncalves
Browse files

Remove assignment which do not make sense. Drop some more structures before...

Remove assignment which do not make sense. Drop some more structures before returning to release memory.
parent b2231316
......@@ -120,10 +120,7 @@ model_opt_r <- function(k,
break
}
}
model_pre <- model1
pbtn1_pre <- pbtn1
pbtn2_pre <- pbtn2
oobe <- oobe
########################################################################
if (model == "rf") {
correct <-
......@@ -138,8 +135,6 @@ model_opt_r <- function(k,
if (length(which_classes_correct) == 0) {
if (j == 1) {
break
} else{
pbtn1 <- pbtn1
}
} else {
d1 <- correct[which_classes_correct]
......@@ -202,8 +197,6 @@ model_opt_r <- function(k,
if (length(which_classes_correct_2) == 0) {
if (j == 1) {
break
} else{
pbtn2 <- pbtn2
}
} else {
d2 <- correct[which_classes_correct_2]
......@@ -300,6 +293,10 @@ model_opt_r <- function(k,
classes <- data$classes
pbt <- rbind(pbtn1, pbtn2)
}
remove(pbt)
remove(pbt1)
remove(pbt2)
return(list(
"k" = k,
"models" = models,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment