Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't have "Split" "RealCover" "RealCover" col #5293

Closed
Huaichao2018 opened this issue Feb 8, 2020 · 0 comments · Fixed by #9437
Closed

don't have "Split" "RealCover" "RealCover" col #5293

Huaichao2018 opened this issue Feb 8, 2020 · 0 comments · Fixed by #9437
Labels

Comments

@Huaichao2018
Copy link

https://xgboost.readthedocs.io/en/latest/R-package/discoverYourData.html
importanceRaw <- xgb.importance(feature_names = sparse_matrix@Dimnames[[2]], model = bst, data = sparse_matrix, label = output_vector)

Cleaning for better display

importanceClean <- importanceRaw[,:=(Cover=NULL, Frequency=NULL)]

head(importanceClean)

Feature Split Gain RealCover RealCover %

1: TreatmentPlacebo -1.00136e-05 0.28575061 7 0.2500000

2: Age 61.5 0.16374034 12 0.4285714

3: Age 39 0.08705750 8 0.2857143

4: Age 57.5 0.06947553 11 0.3928571

5: SexMale -1.00136e-05 0.04874405 4 0.1428571

6: Age 53.5 0.04620627 10 0.3571429

our results is : Feature Gain
1: Age 0.60965369
2: TreatmentPlacebo 0.34017103
3: SexMale 0.02340126
4: AgeDiscret6 0.01514658
5: AgeDiscret4 0.01162745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants