MidnightBSD Magus

devel/R-cran-gbm

Extensions to AdaBoost algorithm

Flavor Version Run OSVersion Arch License Restricted Build Fetch Test Scan
2.0.8_12 639 4.0 amd64 gpl2 0 fail untested untested untested

License Permissions: dist-mirror dist-sell pkg-mirror pkg-sell auto-accept

Events

Machine Phase Type Time Message
m4064 info 2026-05-27 14:55:56.330537 Test Started
m4064 warn 2026-05-27 14:59:21.177419 MASTER_SITES contains non-HTTPS URLs: http://cran.utstat.utoronto.ca/src/contrib/, http://cran.utstat.utoronto.ca/src/contrib/Archive/gbm/
m4064 warn 2026-05-27 14:59:21.187661 fake-qa reported: /usr/local/lib/R/library/gbm/libs/gbm.so is linked to /usr/local/lib/R/lib/libR.so.4 that does not belong to any package; /usr/local/lib/R/library/gbm/libs/gbm.so is linked to /usr/local/lib/gcc14/libgcc_s.so.1 that does not belong to any package
m4064 fail 2026-05-27 14:59:21.19113 make test returned non-zero: 1
m4064 fail 2026-05-27 14:59:21.3934 Test complete.

Build Log

===>  Testing for R-cran-gbm-2.0.8_12
* using log directory '/magus/work/usr/mports/devel/R-cran-gbm/work/gbm.Rcheck'
* using R version 4.4.0 (2024-04-24)
* using platform: amd64-portbld-midnightbsd4.0
* R was compiled by
    MidnightBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd708029e0b2)
    GNU Fortran (MidnightBSD Ports Collection) 14.2.0
* running under: MidnightBSD m4064 4.0.5 MidnightBSD 4.0.5 stable/4.0-n13794-ebf9c891ff GENERIC amd64
* using session charset: ASCII
* using options '--no-manual --no-build-vignettes'
* checking for file 'gbm/DESCRIPTION' ... OK
* this is package 'gbm' version '2.0-8'
* checking package namespace information ... OK
* checking package dependencies ... NOTE
Package suggested but not available for checking: 'RUnit'
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package 'gbm' can be installed ... WARNING
Found the following significant warnings:
  node_categorical.cpp:42:23: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  node_categorical.cpp:45:22: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  node_categorical.cpp:52:27: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  node_categorical.cpp:55:22: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  node_continuous.cpp:38:12: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  node_continuous.cpp:44:12: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
See '/magus/work/usr/mports/devel/R-cran-gbm/work/gbm.Rcheck/00install.out' for details.
* used C++ compiler: 'MidnightBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd708029e0b2)'
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... NOTE
File
  LICENSE
is not mentioned in the DESCRIPTION file.
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking code files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking whether startup messages can be suppressed ... OK
* checking dependencies in R code ... NOTE
'library' or 'require' call to 'RUnit' in package code.
  Please use :: or requireNamespace() instead.
  See section 'Suggested packages' in the 'Writing R Extensions' manual.
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
basehaz.gbm: no visible global function definition for 'supsmu'
basehaz.gbm: no visible global function definition for 'approx'
calibrate.plot: no visible binding for global variable 'binomial'
calibrate.plot: no visible binding for global variable 'poisson'
calibrate.plot: no visible binding for global variable 'gaussian'
calibrate.plot: no visible global function definition for 'glm'
calibrate.plot: no visible global function definition for 'predict'
calibrate.plot: no visible global function definition for 'polygon'
calibrate.plot: no visible global function definition for 'lines'
calibrate.plot: no visible global function definition for 'abline'
gbm: no visible binding for global variable 'na.pass'
gbm: no visible global function definition for 'model.response'
gbm: no visible global function definition for 'model.weights'
gbm: no visible global function definition for 'model.offset'
gbm: no visible global function definition for 'model.frame'
gbm: no visible global function definition for 'terms'
gbm: no visible global function definition for 'reformulate'
gbm.fit: no visible global function definition for 'quantile'
gbm.loss: no visible global function definition for 'weighted.mean'
gbm.more: no visible global function definition for 'model.extract'
gbm.more: no visible global function definition for 'model.frame'
gbm.more: no visible global function definition for 'delete.response'
gbm.more: no visible binding for global variable 'na.pass'
gbm.perf: no visible global function definition for 'loess'
gbm.perf: no visible global function definition for 'par'
gbm.perf: no visible global function definition for 'lines'
gbm.perf: no visible global function definition for 'abline'
gbm.perf: no visible global function definition for 'axis'
gbm.perf: no visible global function definition for 'mtext'
interact.gbm: no visible global function definition for 'weighted.mean'
interact.gbm: no visible binding for global variable 'weighted.mean'
perf.pairwise: no visible global function definition for 'runif'
perf.pairwise: no visible global function definition for
  'weighted.mean'
plot.gbm: no visible global function definition for 'lines'
plot.gbm: no visible global function definition for 'axis'
plot.gbm: no visible global function definition for 'mtext'
plot.gbm: no visible global function definition for 'segments'
plot.gbm: no visible global function definition for 'title'
predict.gbm: no visible global function definition for 'model.frame'
predict.gbm: no visible global function definition for 'terms'
predict.gbm: no visible global function definition for 'reformulate'
predict.gbm: no visible binding for global variable 'na.pass'
quantile.rug: no visible global function definition for 'quantile'
quantile.rug: no visible global function definition for 'rug'
shrink.gbm.pred: no visible global function definition for
  'model.frame'
shrink.gbm.pred: no visible global function definition for
  'delete.response'
shrink.gbm.pred: no visible binding for global variable 'na.pass'
summary.gbm: no visible global function definition for 'barplot'
summary.gbm: no visible global function definition for 'rainbow'
test.gbm: no visible global function definition for 'runif'
test.gbm: no visible global function definition for 'var'
test.gbm: no visible global function definition for 'rnorm'
test.gbm: no visible global function definition for 'predict'
test.gbm: no visible global function definition for 'checkTrue'
test.gbm: no visible global function definition for 'sd'
test.gbm: no visible global function definition for 'rexp'
test.gbm: no visible global function definition for 'rbinom'
test.relative.influence : : no visible global function
  definition for 'rnorm'
test.relative.influence: no visible global function definition for
  'checkEqualsNumeric'
validate.gbm: no visible global function definition for
  'defineTestSuite'
validate.gbm: no visible global function definition for 'runTestSuite'
Undefined global functions or variables:
  abline approx axis barplot binomial checkEqualsNumeric checkTrue
  defineTestSuite delete.response gaussian glm lines loess
  model.extract model.frame model.offset model.response model.weights
  mtext na.pass par poisson polygon predict quantile rainbow rbinom
  reformulate rexp rnorm rug runTestSuite runif sd segments supsmu
  terms title var weighted.mean
Consider adding
  importFrom("grDevices", "rainbow")
  importFrom("graphics", "abline", "axis", "barplot", "lines", "mtext",
             "par", "polygon", "rug", "segments", "title")
  importFrom("stats", "approx", "binomial", "delete.response",
             "gaussian", "glm", "loess", "model.extract", "model.frame",
             "model.offset", "model.response", "model.weights",
             "na.pass", "poisson", "predict", "quantile", "rbinom",
             "reformulate", "rexp", "rnorm", "runif", "sd", "supsmu",
             "terms", "var", "weighted.mean")
to your NAMESPACE file.
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking compiled code ... OK
* checking installed files from 'inst/doc' ... OK
* checking examples ... ERROR
Running examples in 'gbm-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: gbm
> ### Title: Generalized Boosted Regression Modeling
> ### Aliases: gbm gbm.more gbm.fit
> ### Keywords: models nonlinear survival nonparametric tree
> 
> ### ** Examples
>  # A least squares regression example # create some data
> 
> N <- 1000
> X1 <- runif(N)
> X2 <- 2*runif(N)
> X3 <- ordered(sample(letters[1:4],N,replace=TRUE),levels=letters[4:1])
> X4 <- factor(sample(letters[1:6],N,replace=TRUE))
> X5 <- factor(sample(letters[1:3],N,replace=TRUE))
> X6 <- 3*runif(N) 
> mu <- c(-1,0,1,2)[as.numeric(X3)]
> 
> SNR <- 10 # signal-to-noise ratio
> Y <- X1**1.5 + 2 * (X2**.5) + mu
> sigma <- sqrt(var(Y)/SNR)
> Y <- Y + rnorm(N,0,sigma)
> 
> # introduce some missing values
> X1[sample(1:N,size=500)] <- NA
> X4[sample(1:N,size=300)] <- NA
> 
> data <- data.frame(Y=Y,X1=X1,X2=X2,X3=X3,X4=X4,X5=X5,X6=X6)
> 
> # fit initial model
> gbm1 <-
+ gbm(Y~X1+X2+X3+X4+X5+X6,         # formula
+     data=data,                   # dataset
+     var.monotone=c(0,0,0,0,0,0), # -1: monotone decrease,
+                                  # +1: monotone increase,
+                                  #  0: no monotone restrictions
+     distribution="gaussian",     # see the help for other choices
+     n.trees=1000,                # number of trees
+     shrinkage=0.05,              # shrinkage or learning rate,
+                                  # 0.001 to 0.1 usually work
+     interaction.depth=3,         # 1: additive model, 2: two-way interactions, etc.
+     bag.fraction = 0.5,          # subsampling fraction, 0.5 is probably best
+     train.fraction = 0.5,        # fraction of data for training,
+                                  # first train.fraction*N used for training
+     n.minobsinnode = 10,         # minimum total weight needed in each node
+     cv.folds = 3,                # do 3-fold cross-validation
+     keep.data=TRUE,              # keep a copy of the dataset with the object
+     verbose=FALSE)               # don't print out progress
> 
> # check performance using an out-of-bag estimator
> # OOB underestimates the optimal number of iterations
> best.iter <- gbm.perf(gbm1,method="OOB")
Warning in gbm.perf(gbm1, method = "OOB") :
  OOB generally underestimates the optimal number of iterations although predictive performance is reasonably competitive. Using cv.folds>0 when calling gbm usually results in improved predictive performance.
> print(best.iter)
[1] 91
> 
> # check performance using a 50% heldout test set
> best.iter <- gbm.perf(gbm1,method="test")
> print(best.iter)
[1] 133
> 
> # check performance using 5-fold cross-validation
> best.iter <- gbm.perf(gbm1,method="cv")
> print(best.iter)
[1] 137
> 
> # plot the performance # plot variable influence
> summary(gbm1,n.trees=1)         # based on the first tree
                  Length Class  Mode     
initF                1   -none- numeric  
fit               1000   -none- numeric  
train.error       1000   -none- numeric  
valid.error       1000   -none- numeric  
oobag.improve     1000   -none- numeric  
trees             1000   -none- list     
c.splits           725   -none- list     
bag.fraction         1   -none- numeric  
distribution         1   -none- list     
interaction.depth    1   -none- numeric  
n.minobsinnode       1   -none- numeric  
num.classes          1   -none- numeric  
n.trees              1   -none- numeric  
nTrain               1   -none- numeric  
train.fraction       1   -none- numeric  
response.name        1   -none- character
shrinkage            1   -none- numeric  
var.levels           6   -none- list     
var.monotone         6   -none- numeric  
var.names            6   -none- character
var.type             6   -none- numeric  
verbose              1   -none- logical  
data                 6   -none- list     
Terms                3   terms  call     
cv.error          1000   -none- numeric  
cv.folds             1   -none- numeric  
call                14   -none- call     
m                    5   -none- call     
> summary(gbm1,n.trees=best.iter) # based on the estimated best number of trees
                  Length Class  Mode     
initF                1   -none- numeric  
fit               1000   -none- numeric  
train.error       1000   -none- numeric  
valid.error       1000   -none- numeric  
oobag.improve     1000   -none- numeric  
trees             1000   -none- list     
c.splits           725   -none- list     
bag.fraction         1   -none- numeric  
distribution         1   -none- list     
interaction.depth    1   -none- numeric  
n.minobsinnode       1   -none- numeric  
num.classes          1   -none- numeric  
n.trees              1   -none- numeric  
nTrain               1   -none- numeric  
train.fraction       1   -none- numeric  
response.name        1   -none- character
shrinkage            1   -none- numeric  
var.levels           6   -none- list     
var.monotone         6   -none- numeric  
var.names            6   -none- character
var.type             6   -none- numeric  
verbose              1   -none- logical  
data                 6   -none- list     
Terms                3   terms  call     
cv.error          1000   -none- numeric  
cv.folds             1   -none- numeric  
call                14   -none- call     
m                    5   -none- call     
> 
> # compactly print the first and last trees for curiosity
> print(pretty.gbm.tree(gbm1,1))
  SplitVar SplitCodePred LeftNode RightNode MissingNode ErrorReduction Weight
0        2   1.500000000        1         5           9      212.10072    249
1        1   0.665744827        2         3           4       47.89661    108
2       -1  -0.090595276       -1        -1          -1        0.00000     41
3       -1  -0.021982507       -1        -1          -1        0.00000     67
4       -1  -0.048029947       -1        -1          -1        0.00000    108
5        1   0.812172223        6         7           8       49.83074    141
6       -1   0.015986696       -1        -1          -1        0.00000     72
7       -1   0.075448410       -1        -1          -1        0.00000     69
8       -1   0.045084982       -1        -1          -1        0.00000    141
9       -1   0.004697784       -1        -1          -1        0.00000    249
    Prediction
0  0.004697784
1 -0.048029947
2 -0.090595276
3 -0.021982507
4 -0.048029947
5  0.045084982
6  0.015986696
7  0.075448410
8  0.045084982
9  0.004697784
> print(pretty.gbm.tree(gbm1,gbm1$n.trees))
  SplitVar SplitCodePred LeftNode RightNode MissingNode ErrorReduction Weight
0        1  1.7476068130        1         8           9      0.2515803    249
1        0  0.2598220657        2         6           7      0.2409673    217
2        1  0.7957157667        3         4           5      0.3137274     24
3       -1 -0.0089752058       -1        -1          -1      0.0000000     14
4       -1  0.0026202495       -1        -1          -1      0.0000000     10
5       -1 -0.0041437661       -1        -1          -1      0.0000000     24
6       -1  0.0006726056       -1        -1          -1      0.0000000     80
7       -1  0.0013544047       -1        -1          -1      0.0000000    113
8       -1 -0.0042540531       -1        -1          -1      0.0000000     32
9       -1 -0.0001153570       -1        -1          -1      0.0000000    249
     Prediction
0 -0.0001153570
1  0.0004949576
2 -0.0041437661
3 -0.0089752058
4  0.0026202495
5 -0.0041437661
6  0.0006726056
7  0.0013544047
8 -0.0042540531
9 -0.0001153570
> 
> # make some new data
> N <- 1000
> X1 <- runif(N)
> X2 <- 2*runif(N)
> X3 <- ordered(sample(letters[1:4],N,replace=TRUE))
> X4 <- factor(sample(letters[1:6],N,replace=TRUE))
> X5 <- factor(sample(letters[1:3],N,replace=TRUE))
> X6 <- 3*runif(N) 
> mu <- c(-1,0,1,2)[as.numeric(X3)]
> 
> Y <- X1**1.5 + 2 * (X2**.5) + mu + rnorm(N,0,sigma)
> 
> data2 <- data.frame(Y=Y,X1=X1,X2=X2,X3=X3,X4=X4,X5=X5,X6=X6)
> 
> # predict on the new data using "best" number of trees
> # f.predict generally will be on the canonical scale (logit,log,etc.)
> f.predict <- predict(gbm1,data2,best.iter)
Error in UseMethod("predict") : 
  no applicable method for 'predict' applied to an object of class "gbm"
Calls: predict
Execution halted
* DONE

Status: 1 ERROR, 1 WARNING, 4 NOTEs
See
  '/magus/work/usr/mports/devel/R-cran-gbm/work/gbm.Rcheck/00check.log'
for details.

*** Error code 1

Stop.
make: stopped in /usr/mports/devel/R-cran-gbm

Links

Depends On

Depend Of

Nothing

Categories

CVEs

  • Loading CVE information...

LLM Analysis