CRAN Package Check Results for Package SVMMaj

Last updated on 2019-12-14 05:47:46 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.2.9 8.95 292.01 300.96 OK
r-devel-linux-x86_64-debian-gcc 0.2.9 7.26 231.05 238.31 OK
r-devel-linux-x86_64-fedora-clang 0.2.9 371.83 OK
r-devel-linux-x86_64-fedora-gcc 0.2.9 356.32 OK
r-devel-windows-ix86+x86_64 0.2.9 17.00 369.00 386.00 OK
r-devel-windows-ix86+x86_64-gcc8 0.2.9 18.00 381.00 399.00 OK
r-patched-linux-x86_64 0.2.9 6.50 268.94 275.44 ERROR
r-patched-solaris-x86 0.2.9 634.90 OK
r-release-linux-x86_64 0.2.9 7.37 284.29 291.66 OK
r-release-windows-ix86+x86_64 0.2.9 13.00 251.00 264.00 OK
r-release-osx-x86_64 0.2.9 OK
r-oldrel-windows-ix86+x86_64 0.2.9 11.00 232.00 243.00 OK
r-oldrel-osx-x86_64 0.2.9 OK

Check Details

Version: 0.2.9
Check: tests
Result: ERROR
     Running ‘test_all.R’ [15s/14s]
    Running the tests in ‘tests/test_all.R’ failed.
    Complete output:
     > library(testthat)
     > library(SVMMaj)
     > test_check("SVMMaj")
     ── 1. Error: Test for case when test set lies outside of training set (@test_svm
     Number of classes must be equal to 2
     Backtrace:
     1. SVMMaj::svmmaj(X, y)
     2. SVMMaj:::svmmaj.default(X, y)
    
    
     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 ...
     group 0 of 5 : ***
     group 1 of 5 : ***
     group 2 of 5 : ***
     group 3 of 5 : ***
     group 4 of 5 : ***
     group 5 of 5 : ***
     Getting optimal parameters ...
     Done
     Number of observations: 200
     Varying parameters : 2
     Number of gridpoints : 15
     Start cross validation ...
     Getting optimal parameters ...
     Done
     ══ testthat results ═══════════════════════════════════════════════════════════
     [ OK: 14 | SKIPPED: 3 | WARNINGS: 1 | FAILED: 1 ]
     1. Error: Test for case when test set lies outside of training set (@test_svmmaj.R#134)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-patched-linux-x86_64