@pagal_guy wrote:
hello,
While trying to implement boosting in R using caret I used the following code:
library(ISLR); data(Wage); library(ggplot2); library(caret); Wage <- subset(Wage,select=-c(logwage)) inTrain <- createDataPartition(y=Wage$wage,p=0.7, list=FALSE) training <- Wage[inTrain,]; testing <- Wage[-inTrain,] #Fit the model: modFit <- train(wage ~ ., method="gbm",data=training,verbose=FALSE) print(modFit)
This gives an output:
Here some values like n.trees etc. are selected by default.
How do I set the values,for example I want to set n.trees = 500 etc.
Posts: 2
Participants: 2