Data Science Asked by Ishan Dutta on December 7, 2020
I want to Ensemble my predictions for the StratifiedKFold of LGBM and XGBoost into another LGBM Model. I had written the following code which works when the data set has an ID_COL, but in this data set I don’t have any ID_COL. It is simply based on the index. How can I ensemble the model in such case?
The Train and Test data are stored in train
and test
file respectively.
CODE
train_new = train[[TARGET_COL]]
test_new = test[[ID_COL]] #ID_COL is not available in data.
train_new['lgb'] = lgb_oofs
test_new['lgb'] = lgb_preds
train_new['xgb'] = xgb_oofs
test_new['xgb'] = xgb_preds
After this I pass train_new
and test_new
to a LGBM Model.
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP