lightgbm.basic.LightGBMError: Cannot set categorical feature after freed raw data, set free_raw_datalightgbm.basic.LightGBMError: Cannot set categorical feature after freed raw data, set free_raw_data=False when construct Dataset to avoid this.

已经在机器学习行业用lgb算法好久了,还是第一次遇到这个错误

原因:使用lgb训练完模型后,lgb_train, lgb_eval变量虽然还存在,但是在实际内存中已经释放掉原始数据了,所以没法再继续训练模型

解决办法:再重新生成一次这两个变量即可

相关文章:

  • 2021-10-28
  • 2021-07-06
  • 2021-10-14
  • 2022-12-23
  • 2021-09-02
  • 2022-12-23
  • 2021-12-12
  • 2021-09-03
猜你喜欢
  • 2021-09-02
  • 2021-04-12
  • 2021-05-17
  • 2021-10-13
相关资源
相似解决方案