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

Direct using of categorical features #43

Open
sashulyak opened this issue Feb 16, 2017 · 1 comment
Open

Direct using of categorical features #43

sashulyak opened this issue Feb 16, 2017 · 1 comment

Comments

@sashulyak
Copy link

LightGBM can use categorical feature directly.

There is a categorical_feature parameter in LightGBM docs to deal with this behavior:
https://github.com/Microsoft/LightGBM/blob/master/docs/Parameters.md

It would be nice to add categorical feature support to pyLightGBM.

@gw00207
Copy link

gw00207 commented Jun 14, 2017

I can see from the regression example here that you integerise categorical features and then include these with continuous variables:

le = LabelEncoder()

for col in df.columns.tolist():
    if 'cat' in col:
        df[col] = le.fit_transform(df[col])

I agree it would be nice to add categorical feature support to pyLightGBM rather than training on mixed continuous and integerised categories (which doesn't make sense to me)

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

No branches or pull requests

2 participants