Last updated on 2020-08-07 01:50:03 CEST.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 0.2.9 | 9.27 | 325.74 | 335.01 | OK | |
r-devel-linux-x86_64-debian-gcc | 0.2.9 | 7.40 | 225.05 | 232.45 | ERROR | |
r-devel-linux-x86_64-fedora-clang | 0.2.9 | 372.01 | OK | |||
r-devel-linux-x86_64-fedora-gcc | 0.2.9 | 334.21 | OK | |||
r-devel-windows-ix86+x86_64 | 0.2.9 | 31.00 | 353.00 | 384.00 | OK | |
r-patched-linux-x86_64 | 0.2.9 | 9.41 | 317.54 | 326.95 | OK | |
r-patched-solaris-x86 | 0.2.9 | 672.10 | OK | |||
r-release-linux-x86_64 | 0.2.9 | 9.11 | 290.73 | 299.84 | OK | |
r-release-macos-x86_64 | 0.2.9 | OK | ||||
r-release-windows-ix86+x86_64 | 0.2.9 | 25.00 | 263.00 | 288.00 | OK | |
r-oldrel-macos-x86_64 | 0.2.9 | OK | ||||
r-oldrel-windows-ix86+x86_64 | 0.2.9 | 14.00 | 223.00 | 237.00 | OK |
Version: 0.2.9
Check: tests
Result: ERROR
Running ‘test_all.R’ [13s/16s]
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-devel-linux-x86_64-debian-gcc