I used the the feature selection method: RFE to select feature for features. Now I want to select 20 features(there are about 50 features or more) with LGBM model as following code: But I found that the features(sel.ranking_) are different when the os or os version, or computer is changed. I don't know what caused the changing. More, how to solve it that features selection is fixed. Thanks!
gbm = lgb.LGBMClassifier(
boosting_type='gbdt',
objective='binary',
learning_rate=0.01,
colsample_bytree=0.9,
subsample=0.8,
random_state=21,
n_estimators=200,
num_leaves=18)
sel = RFE(gbm, step=1, n_features_to_select=20, verbose=1)
sel.fit(X_train, y_train)
print (sel.ranking_)