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 Random Forest model with Parameter Tuning.
1 2 3 4 5 6 7 8 |
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 Random Forest Tuning parameters causing minimum error |
mtry |
Random Forest uning parameter: number of predictors sampled for spliting at each node.Default is c(1:7) |
ntree |
Random Forest Tuning parameter: number of trees grown.Default is c(50,100,200,500,700). |
maxnodes |
Random Forest Tuning parameter: The size of the tree. Default is c(5,10,15,20,30,50) |
nodesize |
Random Forest Tuning parameter: Max number of terminal nodes.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.