xgboostExplainer | An R package that makes xgboost models | Machine Learning library
kandi X-RAY | xgboostExplainer Summary
kandi X-RAY | xgboostExplainer Summary
An R package that makes xgboost models fully interpretable.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of xgboostExplainer
xgboostExplainer Key Features
xgboostExplainer Examples and Code Snippets
Community Discussions
Trending Discussions on xgboostExplainer
QUESTION
I am currently trying to work with the new xgboostExplainer
package.
I am following the githib page here https://github.com/AppliedDataSciencePartners/xgboostExplainer/blob/master/R/explainPredictions.R
on line 34, the xgboost model is ran:
xgb.model <- xgboost(param =param, data = xgb.train.data, nrounds=3)
However on line 43 I am running into some problems.
explainer = buildExplainer(xgb.model,xgb.train.data, type="binary", base_score = 0.5, n_first_tree = xgb.model$best_ntreelimit - 1)
I understand that n_first_tree
is depreciated but I cannot seem to access the xgb.model$best_ntreelimit -1
part.
The sections I can access in xgboost are;
...ANSWER
Answered 2018-Mar-22 at 15:04I tested the code in the linked page.
best_ntreelimit
is a parameter returned by xgb.cv
when early_stopping_rounds
is set. From the help of xgb.cv
:
best_ntreelimit the ntreelimit value corresponding to the best iteration, which could further be used in predict method (only available with early stopping).
You can get to it by using xgb.cv:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install xgboostExplainer
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page