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

[R-package] categorical_features should be in lgb.Dataset #1988

Closed
Laurae2 opened this issue Feb 2, 2019 · 2 comments · Fixed by #2000
Closed

[R-package] categorical_features should be in lgb.Dataset #1988

Laurae2 opened this issue Feb 2, 2019 · 2 comments · Fixed by #2000
Assignees

Comments

@Laurae2
Copy link
Contributor

Laurae2 commented Feb 2, 2019

Demos to fix later:

https://github.com/Microsoft/LightGBM/blob/master/R-package/demo/categorical_features_prepare.R
https://github.com/Microsoft/LightGBM/blob/master/R-package/demo/categorical_features_rules.R

categorical_features should be used in lgb.Dataset

But also not lgb.Dataset.create.valid, otherwise:

Error in .subset2(public_bind_env, "initialize")(...) : 
  lgb.Dataset: Only can uselgb.Predictoras predictor

Warnings of code:

[LightGBM] [Warning] Unknown parameter categorical_feature=
[LightGBM] [Warning] Unknown parameter 2,
[LightGBM] [Warning] Unknown parameter 3,
[LightGBM] [Warning] Unknown parameter 4,
[LightGBM] [Warning] Unknown parameter 5,
[LightGBM] [Warning] Unknown parameter 7,
[LightGBM] [Warning] Unknown parameter 8,
[LightGBM] [Warning] Unknown parameter 9,11,16
[LightGBM] [Warning] min_data is set=1, min_data=1 will be ignored. Current value: min_data=1
[LightGBM] [Warning] Unknown parameter categorical_feature=
[LightGBM] [Warning] Unknown parameter 2,
[LightGBM] [Warning] Unknown parameter 3,
[LightGBM] [Warning] Unknown parameter 4,
[LightGBM] [Warning] Unknown parameter 5,
[LightGBM] [Warning] Unknown parameter 7,
[LightGBM] [Warning] Unknown parameter 8,
[LightGBM] [Warning] Unknown parameter 9,11,16
[LightGBM] [Warning] Starting from the 2.1.2 version, default value for the "boost_from_average" parameter in "binary" objective is true.
This may cause significantly different results comparing to the previous versions of LightGBM.
Try to set boost_from_average=false, if your old models produce bad results
[LightGBM] [Info] Number of positive: 458, number of negative: 3542
[LightGBM] [Info] Total Bins 930
[LightGBM] [Info] Number of data: 4000, number of used features: 16
[LightGBM] [Warning] Unknown parameter categorical_feature=
[LightGBM] [Warning] Unknown parameter 2,
[LightGBM] [Warning] Unknown parameter 3,
[LightGBM] [Warning] Unknown parameter 4,
[LightGBM] [Warning] Unknown parameter 5,
[LightGBM] [Warning] Unknown parameter 7,
[LightGBM] [Warning] Unknown parameter 8,
[LightGBM] [Warning] Unknown parameter 9,11,16
[LightGBM] [Info] [binary:BoostFromScore]: pavg=0.114500 -> initscore=-2.045578
[LightGBM] [Info] Start training from score -2.045578
@guolinke
Copy link
Collaborator

guolinke commented Feb 6, 2019

@Laurae2 Can this be closed ?

@Laurae2 Laurae2 closed this as completed Feb 6, 2019
@Laurae2
Copy link
Contributor Author

Laurae2 commented Feb 6, 2019

One file seems to have still have the issue.

@Laurae2 Laurae2 reopened this Feb 6, 2019
Laurae2 added a commit that referenced this issue Feb 6, 2019
guolinke pushed a commit that referenced this issue Feb 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants