在 Windows 下安装 xgboost

之前尝试过各种方法,后来发现其实最直接的方法就是找到 GitHub 上 xgboost 的最新发布版本。

然后把压缩包下载下来——连 git 都不需要。然后按照网上提供的方法,解压后打开 \windows\xgboost.sln ,编译项目 xgboost_wrapper (当然,需要选择 RELEASE 模式)。最后把生成的 xgboost_wrapper.dll 复制到 \wrappers\ 文件夹中。最后应该就可以进行包的安装了。

对于 Python ,使用 \python-package\setup.py 进行安装。注意需要带上 install 参数。

R我还没试过 ||-_- 但应该差不多吧。

总之,不要试图使用 git 克隆最新版本,首先,最新的提交不能使用MSVC编译。实际上,tqchen 在最新的提交中已经移除了 \windows\ 文件夹。(参阅 #736)换成 Min-GW 之后, rabit 编译怎么都过不去。如果尝试使用 Cygwin 自带的 mingw32-make ,又会出现宏定义不正确的问题。(参阅 #625

所以,在经过一天的尝试之后,我还是放弃修改 makefile,转而投奔 MSVC  🙄

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

ERROR: si-captcha.php plugin: GD image support not detected in PHP!

Contact your web host and ask them to enable GD image support for PHP.

ERROR: si-captcha.php plugin: imagepng function not detected in PHP!

Contact your web host and ask them to enable imagepng for PHP.

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

Content is available under CC BY-SA 3.0 unless otherwise noted.