EpistasisLab / tpot

A Python Automated Machine Learning tool that optimizes machine learning pipelines using genetic programming.
http://epistasislab.github.io/tpot/
GNU Lesser General Public License v3.0
9.66k stars 1.56k forks source link

How TPOT specify categorical feature by lgbm? #771

Open shuaianuoe opened 5 years ago

shuaianuoe commented 5 years ago

Hi all,

As we know, lgbm is capable of specifying the categorical features through the categorical_feature parameter of the fit function. As follows: model = lgb.LGBMRegressor() model .fit(X_train, y_train,feature_name=list(X_train.columns), categorical_feature=list(['col_1', 'col_2']))

I know TPOT added OneHotEncoder to handle Categorical features. However, the idea of ​​lgbm processing categories is not just based on one-hot. So, how can i use TPOT_CONFIG to specify the categorical feature of lgbm?

Thank you very much and best regards!

weixuanfu commented 5 years ago

The current version of TPOT cannot specify this parameters in fit function. But it is possible to expend set_sample_weight function to let TPOT fit function accept other additional keywords arguments as TPOT accepts sample_weight.