基于Windows平台在matlab上配置可使用的xgboost工具箱

一、下载
在matlab中安装工具箱名为“Functions to run xgboost in Matlab”。
2、创建一个文件夹 D:\r\xgboost(e.g.)
3、创建一个空的git repository
4、从https://github.com/dmlc/xgboost 将代码pull下来,注意是pull在D:\r\xgboost文件下
5、git bash here(D:r\xgboost是同等级文件目录下,而不是里面)-
open a git bash.在里面输入:
* git submodule init
* git submodule update~~
二、配置
第一步:下载轮子文件从网址:
https://s3-us-west-2.amazonaws.com/xgboost-nightly-builds/list.html
第二步:
配置xgboost_install_dir 和 wheel_fn 在 xgboost_install.m中
第三步
运行 xgboost_install

wheel_fn = 'D:\temp\xgboost-1.1.0_SNAPSHOT+e726dd990281d9b0b1f8403fc837a6e76a0baecc-py3-none-win_amd64.whl';
unzip(wheel_fn, xgboost_install_dir_tmp);

from = [xgboost_install_dir_tmp '\xgboost\lib\xgboost.dll'];
to = [xgboost_install_dir '\' 'xgboost.dll'];
movefile(from, to);

FileList = dir(fullfile(xgboost_install_dir_tmp, '**', 'vcomp140.dll'));

from = [FileList(1).folder '\' FileList(1).name];
to = [xgboost_install_dir '\' FileList(1).name];
movefile(from, to);

rmdir(xgboost_install_dir_tmp, 's');
% 这里如果下不下来,直接把链接贴到浏览器上面下载,然后将相应文件命名为xgboost.h然后添加到D:\t\xgboost\lib中
url = 'https://raw.githubusercontent.com/dmlc/xgboost/master/include/xgboost/c_api.h';
filename = [xgboost_install_dir 'xgboost.h'];
outfilename = websave(filename,url);

  • 3
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 7
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值