You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lgb.prepare2() and lgb.prepare_rules2() should convert columns of type "numeric" to type "integer".
Motivation
The R package currently exports two functions that can be used to convert non-integer columns in tabular datasets to integer.
lgb.prepare2(): converts columns of type "character" and "factor" to "integer"
lgb.prepare_rules2(): similar to lgb.prepare(), but returns a set of "rules" describing how non-integer 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 integer). The fact that it does not convert numeric columns to integer could cause issues in programs that require every column to be integer.
The text was updated successfully, but these errors were encountered:
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.
This is now irrelevant since #3095 has been merged, so I'm marking it wontfix.
lgb.convert()' (the function that replaces lgb.prepare2() will now take in a data frame and guarantee that it returns one that has only integer and numeric columns. It is completely fine for a training dataset to mix integer and numeric values.
Summary
lgb.prepare2()
andlgb.prepare_rules2()
should convert columns of type"numeric"
to type"integer"
.Motivation
The R package currently exports two functions that can be used to convert non-integer columns in tabular datasets to integer.
lgb.prepare2()
: converts columns of type"character"
and"factor"
to"integer"
lgb.prepare_rules2()
: similar tolgb.prepare()
, but returns a set of "rules" describing how non-integer 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 integer). The fact that it does not convert numeric columns to integer could cause issues in programs that require every column to be integer.
The text was updated successfully, but these errors were encountered: