一、下载
在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);