LightGBM.cv時,feature_pre_filter和min_data_in_leaf相互矛盾


當LightGBM.cv時,如果min_data_in_leaf設置的值比默認值(20)小的時候,就會報錯:

LightGBMError: Reducing `min_data_in_leaf` with `feature_pre_filter=true` may cause unexpected behaviour for features that were pre-filtered by the larger `min_data_in_leaf`.
You need to set `feature_pre_filter=false` to dynamically change the `min_data_in_leaf`.

 

在網上查了很多資料,說是要在dataset之前設置feature_pre_filter,但是有的人又說這個參數已經刪除了,翻看官網也沒有看到很好的解決方法:https://github.com/optuna/optuna/issues/1718

反正我們就默認這個參數feature_pre_filter已經刪除了,如果我們調參時min_data_in_leaf 的最佳值大於20時,就可以保留min_data_in_leaf參數,如果小於時,就刪除這個參數。就可以運行了

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM