-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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] lgb.convert() functions should convert columns of type 'logical' #2678
Labels
Comments
Closed in favor of being in #2302. We decided to keep all feature requests in one place. Welcome to contribute this feature! Please re-open this issue (or post a comment if you are not a topic starter) if you are actively working on implementing this feature. |
jameslamb
changed the title
[R-package] lgb.prepare functions should convert columns of type 'logical'
[R-package] lgb.convert() functions should convert columns of type 'logical'
Aug 1, 2020
Just updated the title and description now that #3095 has been merged. |
jameslamb
added a commit
to jameslamb/LightGBM
that referenced
this issue
Aug 3, 2020
jameslamb
added a commit
that referenced
this issue
Aug 6, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
lgb.convert()
andlgb.convert_with_rules()
should convert columns of type"logical"
to type"integer"
.Motivation
The R package currently exports two functions that can be used to convert tabular datasets into model-ready form:
lgb.convert()
: converts columns of type"character"
and"factor"
to"integer"
lgb.convert_with_rules()
: similar tolgb.convert()
, but returns a set of "rules" describing how non-numeric values were mapped to integer values. Also allows for user-provided rules, useful for cases where you want to be sure the encoding is the same on multiple datasets (e.g. training, test, and validation datasets)These functions are intended to make it easier to create a model-ready dataset (all numeric or all integer). The fact that they do not convert columns of type
"logical"
means that they don't cover a very common case...convertingTRUE/FALSE
to1/0
.The text was updated successfully, but these errors were encountered: