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

interaction_constraints with more than 10^5 parameters fail. #5179

Closed
palVJ opened this issue Jan 2, 2020 · 3 comments · Fixed by #5543
Closed

interaction_constraints with more than 10^5 parameters fail. #5179

palVJ opened this issue Jan 2, 2020 · 3 comments · Fixed by #5543

Comments

@palVJ
Copy link

palVJ commented Jan 2, 2020

Using xgb.train with more than 10^5 parameters and using the parameter interaction_constraints, I get the following error:

Error in xgb.iter.update(bst$handle, dtrain, iteration - 1, obj) :
[09:54:20] ./dmlc-core/include/dmlc/././json.h:788: Check failed: ch == ',' (101 vs. ,) : Error at Line 0, around ^+05,100001,100002,100003,100004,100005,100006,100007,100008,100, JSON array expect ']' or ','. Get 'e' instead

I suspect 100001, 100002 and so on represent feature indices with values more than 100 000.
I tried with feature indices with values less than 100 000, and it worked.

Am I right, and if so, can this be fixed?

@trivialfis
Copy link
Member

Em.. there's scientific notation in the indices string. Should be able to fix it.

@palVJ
Copy link
Author

palVJ commented Jan 2, 2020 via email

@trivialfis
Copy link
Member

The parameters are passed as string into XGBoost, a quick workaround right now is to disable R's scientific representation used by paste. Will further investigate a proper solution.

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

Successfully merging a pull request may close this issue.

2 participants