1

I am trying to tune gradient boosting (caret package) with differential evolution (DEOptim) in R language. I have a question, is correct to define the maximum of accuracy at each iteration in my eval function as the following?

return(XGBoost_model$results$Accuracy) # Maximum Accuracy

I am asking this question because when I plot the result, the plot shows a descending graphic. enter image description here

My eval function is defined as follow:

XGBoost_model <- caret::train(isMut ~., 
                                             data = data,
                                             method = "gbm",
                                             trControl = train_settings,
                                             verbose = FALSE, 
                                             
                                             tuneGrid = expand.grid(
                                                 interaction.depth = round(x1), # number of depth
                                                 n.trees = round(x2), # number of tree
                                                 shrinkage = 0.1, 
                                                 n.minobsinnode = 20 
                                             ) 
        )
    )
    
    return(XGBoost_model$results$Accuracy) # Maximum Accuracy
    
}

# Define minimum and maximum values for each input
interaction.depth_min_max <- c(1,9)
n.trees_min_max <- c(1500,2000)
desertnaut
  • 57,590
  • 26
  • 140
  • 166
user979974
  • 883
  • 3
  • 13
  • 32
  • Beware of the *scale* of the plot! "Decreasing", yes, but a decrease from 0.9771 to 0.9752 is actually nothing, and it can be very well attributed to the expected fluctuations as the training proceeds... – desertnaut Oct 25 '22 at 12:52
  • @desertnaut, thanks for your clear explanations. So I have to nothing to worry about the definition of return the max accuracy then. – user979974 Oct 25 '22 at 12:56

0 Answers0