for loop in create.new.tree.features was referencing length(trees) as the upper bound of the loop. trees is a base R dataset and not the model that the code is generating. Changed loop boundary to model$niter which should be the number of trees.
XGBoost R Feature Walkthrough
- Basic walkthrough of wrappers
- Train a xgboost model from caret library
- Cutomize loss function, and evaluation metric
- Boosting from existing prediction
- Predicting using first n trees
- Generalized Linear Model
- Cross validation
- Create a sparse matrix from a dense one
Benchmarks
Notes
- Contribution of examples, benchmarks is more than welcomed!
- If you like to share how you use xgboost to solve your problem, send a pull request:)