擅长:python、mysql、java
<p>正如本<a href="https://discuss.xgboost.ai/t/xgbclassifier-un-pickling-fails-if-scikit-learn-is-not-istalled/1520" rel="nofollow noreferrer">thread</a>中所讨论的,原因是<code>XGBClassifier</code>直接与<code>scikit-learn</code>API交互,因此也需要在远程服务器上安装该API。如果您使用<code>xgboost.booster</code>类(本机xgboost模型,而不是scikit学习类型模型),它就可以正常工作<br/>
此外,按照<a href="https://xgboost.readthedocs.io/en/latest/tutorials/saving_model.html" rel="nofollow noreferrer">model I/O page</a>进行保存和加载应该可以正常工作。<br/>
另一个“答案”不正确,错误并非源于数据帧为空/无</p>