forked from dmlc/xgboost
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [R] MSVC compatibility * [GPU] allow seed in BernoulliRng up to size_t and scale to uint32_t * R package build with cmake and CUDA * R package CUDA build fixes and cleanups * always export the R package native initialization routine on windows * update the install instructions doc * fix lint * use static_cast directly to set BernoulliRng seed * [R] demo for GPU accelerated algorithm * tidy up the R package cmake stuff * R pack cmake: installs main dependency packages if needed * [R] version bump in DESCRIPTION * update NEWS * added short missing/sparse values explanations to FAQ
- Loading branch information
Showing
14 changed files
with
392 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Package: xgboost | ||
Type: Package | ||
Title: Extreme Gradient Boosting | ||
Version: 0.6.4.6 | ||
Date: 2017-01-04 | ||
Version: 0.6.4.7 | ||
Date: 2017-09-25 | ||
Author: Tianqi Chen <[email protected]>, Tong He <[email protected]>, | ||
Michael Benesty <[email protected]>, Vadim Khotilovich <[email protected]>, | ||
Yuan Tang <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# An example of using GPU-accelerated tree building algorithms | ||
# | ||
# NOTE: it can only run if you have a CUDA-enable GPU and the package was | ||
# specially compiled with GPU support. | ||
# | ||
# For the current functionality, see | ||
# https://xgboost.readthedocs.io/en/latest/gpu/index.html | ||
# | ||
|
||
library('xgboost') | ||
|
||
# Simulate N x p random matrix with some binomial response dependent on pp columns | ||
set.seed(111) | ||
N <- 1000000 | ||
p <- 50 | ||
pp <- 25 | ||
X <- matrix(runif(N * p), ncol = p) | ||
betas <- 2 * runif(pp) - 1 | ||
sel <- sort(sample(p, pp)) | ||
m <- X[, sel] %*% betas - 1 + rnorm(N) | ||
y <- rbinom(N, 1, plogis(m)) | ||
|
||
tr <- sample.int(N, N * 0.75) | ||
dtrain <- xgb.DMatrix(X[tr,], label = y[tr]) | ||
dtest <- xgb.DMatrix(X[-tr,], label = y[-tr]) | ||
wl <- list(train = dtrain, test = dtest) | ||
|
||
# An example of running 'gpu_hist' algorithm | ||
# which is | ||
# - similar to the 'hist' | ||
# - the fastest option for moderately large datasets | ||
# - current limitations: max_depth < 16, does not implement guided loss | ||
# You can use tree_method = 'gpu_exact' for another GPU accelerated algorithm, | ||
# which is slower, more memory-hungry, but does not use binning. | ||
param <- list(objective = 'reg:logistic', eval_metric = 'auc', subsample = 0.5, nthread = 4, | ||
max_bin = 64, tree_method = 'gpu_hist') | ||
pt <- proc.time() | ||
bst_gpu <- xgb.train(param, dtrain, watchlist = wl, nrounds = 50) | ||
proc.time() - pt | ||
|
||
# Compare to the 'hist' algorithm: | ||
param$tree_method <- 'hist' | ||
pt <- proc.time() | ||
bst_hist <- xgb.train(param, dtrain, watchlist = wl, nrounds = 50) | ||
proc.time() - pt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.