Description Usage Arguments Value Author(s)
This function takes training data, tesing data, target variable, tuning parameters, and predict target variable of the training data by GBM regression model.
1 2 3 4 5 6 7 |
train |
Training Data as a dataframe. |
test |
Testing Data as a dataframe. |
target |
Name of the variable that needs to predict |
drop |
Name of the variable that needs to be dropped before building the model. |
num_trials |
Total number of trails to find best combination of GBM parameters causing minimum error |
interaction.depth |
GBM Tuning parameter: Integer specifying the maximum depth of each tree (i.e., the highest level of variable interactions allowed). A value of 1 implies an additive model, a value of 2 implies a model with up to 2-way interactions, etc. Default is c(1:7) |
n.trees |
GBM Tuning parameter: Integer specifying the total number of trees to fit. This is equivalent to the number of iterations and the number of basis functions in the additive expansion. Default is c(50,100,200,500,700). |
shrinkage |
GBM Tuning parameter: a shrinkage parameter applied to each tree in the expansion. Also known as the learning rate or step-size reduction; 0.001 to 0.1 usually work, but a smaller learning rate typically requires more trees. Default is c(.1,.01,.001) |
minobsinnode |
GBM Tuning parameter: Integer specifying the minimum number of observations in the terminal nodes of the trees. Note that this is the actual number of observations, not the total weight.Default is c(1,2,5,10) |
type |
if type = "tuning", it will return the least error with best value of the best parameter combination,any other value will return the prediction on testing data. |
The value returns from this function is a numeric vector.
ABIR CHAKRABORTY < mail2abirchakraborty@gmail.com >
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.