CRAN Package Check Results for Package SVMMaj

Last updated on 2022-07-05 01:52:23 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.2.9.1 10.69 316.93 327.62 NOTE
r-devel-linux-x86_64-debian-gcc 0.2.9.1 8.13 233.77 241.90 NOTE
r-devel-linux-x86_64-fedora-clang 0.2.9.1 410.71 NOTE
r-devel-linux-x86_64-fedora-gcc 0.2.9.1 373.86 NOTE
r-devel-windows-x86_64 0.2.9.1 22.00 323.00 345.00 NOTE
r-patched-linux-x86_64 0.2.9.1 9.87 317.01 326.88 OK
r-release-linux-x86_64 0.2.9.1 8.21 309.78 317.99 OK
r-release-macos-arm64 0.2.9.1 223.00 OK
r-release-macos-x86_64 0.2.9.1 185.00 OK
r-release-windows-x86_64 0.2.9.1 26.00 358.00 384.00 ERROR
r-oldrel-macos-arm64 0.2.9.1 187.00 OK
r-oldrel-macos-x86_64 0.2.9.1 197.00 OK
r-oldrel-windows-ix86+x86_64 0.2.9.1 23.00 342.00 365.00 OK

Check Details

Version: 0.2.9.1
Check: Rd files
Result: NOTE
    checkRd: (-1) diabetes.Rd:18: Escaped LaTeX specials: \^
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64

Version: 0.2.9.1
Check: tests
Result: ERROR
     Running 'test_all.R' [20s]
    Running the tests in 'tests/test_all.R' failed.
    Complete output:
     > library(testthat)
     > library(SVMMaj)
     > test_check("SVMMaj")
    
     svmmaj> ## using default settings
     svmmaj> model1 <- svmmaj(
     svmmaj+ diabetes$X, diabetes$y, hinge = 'quadratic', lambda = 1)
    
     svmmaj> summary(model1)
     Call:
     svmmaj.default(X = diabetes$X, y = diabetes$y, lambda = 1, hinge = "quadratic")
    
     Settings:
     lambda 1
     hinge error quadratic
     spline basis no
     type of kernel linear
    
     Data:
     class labels negative positive
     rank of X 8
     number of predictor variables 8
     number of objects 768
     omitted objects 0
    
     Model:
     update method svd
     number of iterations 9
     loss value 490.0413
     number of support vectors 691
    
     Confusion matrix:
     Predicted(yhat)
     Observed (y) negative positive Total
     negative 446 54 500
     positive 115 153 268
     Total 561 207 768
    
     Classification Measures:
    
     hit rate 0.78
     weighted hit rate 0.78
     misclassification rate 0.22
     weighted missclassification rate 0.22
    
     TP FP Precision
     negative 0.892 0.108 0.795
     positive 0.571 0.429 0.739
    
     svmmaj> weights.obs = list(positive = 2, negative = 1)
    
     svmmaj> ## using radial basis kernel
     svmmaj> library(kernlab)
    
     svmmaj> model2 <- svmmaj(
     svmmaj+ diabetes$X, diabetes$y, hinge = 'quadratic', lambda = 1,
     svmmaj+ weights.obs = weights.obs, scale = 'interval',
     svmmaj+ kernel = rbfdot,
     svmmaj+ kernel.sigma = 1
     svmmaj+ )
    
     svmmaj> summary(model2)
     Call:
     svmmaj.default(X = diabetes$X, y = diabetes$y, lambda = 1, weights.obs = weights.obs,
     scale = "interval", kernel = rbfdot, kernel.sigma = 1, hinge = "quadratic")
    
     Settings:
     lambda 1
     hinge error quadratic
     spline basis no
     type of kernel rbfkernel
     parameters of kernel degree = 1 offset = 1 scale = 1 sigma = 1
     Data:
     class labels negative positive
     rank of X 221
     number of predictor variables 8
     number of objects 768
     omitted objects 0
    
     Model:
     update method Eigen
     number of iterations 11
     loss value 643.2998
     number of support vectors 686
    
     Confusion matrix:
     Predicted(yhat)
     Observed (y) negative positive Total
     negative 376 124 500
     positive 54 214 268
     Total 430 338 768
    
     Classification Measures:
    
     hit rate 0.768
     weighted hit rate 0.776
     misclassification rate 0.232
     weighted missclassification rate 0.224
    
     TP FP Precision
     negative 0.752 0.248 0.874
     positive 0.799 0.201 0.633
    
     svmmaj> ## I-spline basis
     svmmaj> library(ggplot2)
    
     svmmaj> model3 <- svmmaj(
     svmmaj+ diabetes$X, diabetes$y, weight.obs = weight.obs,
     svmmaj+ spline.knots = 3, spline.degree = 2
     svmmaj+ )
    
     svmmaj> plotWeights(model3, plotdim = c(2, 4))
     TableGrob (3 x 3) "arrange": 9 grobs
     z cells name grob
     1 1 (1-1,1-1) arrange gtable[layout]
     2 2 (1-1,2-2) arrange gtable[layout]
     3 3 (1-1,3-3) arrange gtable[layout]
     4 4 (2-2,1-1) arrange gtable[layout]
     5 5 (2-2,2-2) arrange gtable[layout]
     6 6 (2-2,3-3) arrange gtable[layout]
     7 7 (3-3,1-1) arrange gtable[layout]
     8 8 (3-3,2-2) arrange gtable[layout]
     9 9 (3-3,3-3) arrange gtable[guide-box]
     Number of observations: 200
     Varying parameters : 1
     Number of gridpoints : 3
     Start cross validation ...
     Getting optimal parameters ...
     Done
     Number of observations: 200
     Varying parameters : 2
     Number of gridpoints : 15
     Start cross validation ...
     Getting optimal parameters ...
     Done
     [ FAIL 1 | WARN 1 | SKIP 3 | PASS 14 ]
    
     ══ Skipped tests ═══════════════════════════════════════════════════════════════
     • empty test (3)
    
     ══ Failed tests ════════════════════════════════════════════════════════════════
     ── Error (test_svmmaj.R:134:5): Test for case when test set lies outside of training set ──
     Error in `svmmaj.default(X, y)`: Number of classes must be equal to 2
     Backtrace:
     ▆
     1. ├─SVMMaj::svmmaj(X, y) at test_svmmaj.R:134:4
     2. └─SVMMaj:::svmmaj.default(X, y)
    
     [ FAIL 1 | WARN 1 | SKIP 3 | PASS 14 ]
     Error: Test failures
     Execution halted
Flavor: r-release-windows-x86_64