微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Python => AutoML:XGBoost 不可用;跳过它

如何解决Python => AutoML:XGBoost 不可用;跳过它

我在运行 h2o AutoML 时收到此警告。我安装了 3.32.1.2 版本,并在 python 3.8 上运行它。

AutoML progress: |
11:30:52.773: AutoML: XGBoost is not available; skipping it.

代码

import h2o
h2o.init()

h2o_df = h2o.H2OFrame(df)

train,test = h2o_df.split_frame(ratios=[.75])

# Identify predictors and response
x = train.columns
y = "TERM_DEPOSIT"
x.remove(y)

from h2o.automl import H2OAutoML

aml = H2OAutoML(max_runtime_secs=600,#exclude_algos=['DeepLearning'],seed=1,#stopping_metric='logloss',#sort_metric='logloss',balance_classes=False,project_name='Completed'
)
%time aml.train(x=x,y=y,training_frame=train)

解决方法

Windows 不支持 XGBoost,请参阅 H2O 文档中的 limitations

如果您没有使用Windows并且在上面提到的文档中没有找到其他原因,您可以尝试重新安装h2o,例如,

pip install --force-reinstall https://h2o-release.s3.amazonaws.com/h2o/rel-zipf/2/Python/h2o-3.32.1.2-py2.py3-none-any.whl
,

我想我找到了这个警告的答案。我正在运行 Windows 机器。

https://twitter.com/ledell/status/1148512129659625472?lang=en

如果您使用的是 Windows,则不支持 XGBoost ? 所以教程中使用 XGBoost 的部分可以替换为 h2o.gbm()。 AutoML 过程还将排除 XGBoost 模型。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。