[Rcpp-devel] [Pre-ANN] RcppArmadillo 0.8.100.1.0, and request for help
Dirk Eddelbuettel
edd at debian.org
Sun Oct 8 12:35:59 CEST 2017
On 8 October 2017 at 07:41, Florian Privé wrote:
| Hello Dirk,
|
| I'm the maintainer of package bigstatsr.
Yes. I BCC'ed you.
| Seems OK.
Did you actually install RcppArmadillo 0.8.100.1.0 ?
CRAN and I both get what follows with its 'OK: 1625 SKIPPED: 2 FAILED: 1'.
* checking compiled code ... OK
* checking examples ... ERROR
Running examples in ‘bigstatsr-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: big_spSVM
> ### Title: Sparse SVM
> ### Aliases: big_spSVM
>
> ### ** Examples
>
> set.seed(1)
>
> big_spSVM <- bigstatsr:::big_spSVM
>
> # simulating some data
> N <- 73
> M <- 430
> X <- FBM(N, M, init = rnorm(N * M, sd = 5))
> y <- sample(0:1, size = N, replace = TRUE)
> y.factor <- factor(y, levels = c(1, 0))
> covar <- matrix(rnorm(N * 3), N)
>
> # error, only handle standard R matrices
> ## Not run: test <- sparseSVM::sparseSVM(X, y)
>
> # OK here
> test2 <- big_spSVM(X, y)
> str(test2)
List of 10
$ call : language COPY_sparseSVM(X = X, y.train = y01.train, ind.train = ind.train, covar.train = covar.train)
$ intercept : Named num [1:100] 0 0 0 0 0 0 0 0 0 0 ...
..- attr(*, "names")= chr [1:100] "0.2624" "0.2545" "0.2469" "0.2396" ...
$ beta :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
.. ..@ i : int(0)
.. ..@ p : int [1:101] 0 0 0 0 0 0 0 0 0 0 ...
.. ..@ Dim : int [1:2] 430 100
.. ..@ Dimnames:List of 2
.. .. ..$ : NULL
.. .. ..$ : chr [1:100] "0.2624" "0.2545" "0.2469" "0.2396" ...
.. ..@ x : num(0)
.. ..@ factors : list()
$ iter : int [1:100] 0 9 6 84 3 2 5 6 5 4 ...
$ saturated : logi FALSE
$ lambda : num [1:100] 0.262 0.255 0.247 0.24 0.232 ...
$ alpha : num 1
$ gamma : num 0.1
$ penalty.factor: num [1:430] 1 1 1 1 1 1 1 1 1 1 ...
$ levels : int [1:2] 0 1
- attr(*, "class")= chr "big_sp"
>
> # how to use covariables?
> X2 <- cbind(X[], covar)
> test <- sparseSVM::sparseSVM(X2, y.factor, alpha = 0.5)
Error in loadNamespace(name) : there is no package called ‘sparseSVM’
Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
Running ‘testthat.R’ [39s/33s]
[40s/33s] ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
> library(testthat)
> library(bigstatsr)
>
> test_check("bigstatsr")
1. Error: correlation between predictors (@test-CMSA.R#32) ---------------------
missing value where TRUE/FALSE needed
1: get_beta(mod.bigstatsr$beta[, 20:60], meth) at testthat/test-CMSA.R:32
(1)(1)(1)(1)(2)(2)(2)(2)(2)(2)(2)(2)testthat results ================================================================
OK: 1625 SKIPPED: 2 FAILED: 1
1. Error: correlation between predictors (@test-CMSA.R#32)
Error: testthat unit tests failed
Execution halted
* checking PDF version of manual ... OK
* DONE
Status: 2 ERRORs, 1 WARNING, 2 NOTEs
Dirk
|
| Florian
|
| 2017-10-08 0:15 GMT+02:00 Dirk Eddelbuettel <edd at debian.org>:
|
| >
| > RcppArmadillo 0.8.100.1.0 is available in the drat repo for the RcppCore
| > org.
| > See the README.md at https://github.com/RcppCore/drat which has this
| > exammple:
| >
| > # first add the repo
| > drat:::add("RcppCore")
| > # either install just one or more given packages
| > install.packages("RcppArmadillo")
| > # or update already installed packages
| > update.packages()
| >
| > You can also add the repo URL by hand to options("repos"), or supply it to
| > install.packages(), or ... I happen to like drat. The files NEWS.Rd and
| > ChangeLog have the goods, I make a fuller announcement if and when it makes
| > it to CRAN.
| >
| > There are a rathre fair number of upstream changes in here -- making it the
| > first Armadillo release by Conrad with an 8.* number. It also has further
| > sparse matrix improvements from our end thanks to Serguei and Binxiang.
| >
| > I had uploaded this to CRAN based on a reverse depends check ... where the
| > previous version was still in the loadpath. Ooops. So I overlooked a few
| > build or test errors for which I need a bit of help from the maintainers.
| > In
| > particular, packages
| >
| > biglasso
| > bigstatsr
| > HSAR
| > netdiffuseR
| > repolr
| >
| > now come up as failing their tests. I am BCCing the maintainers and kindly
| > ask if they could take a look too --- I don't always have all suggested
| > packages installed.
| >
| > In the case of HSAR, I found that a one life of code needs a changed
| > imposed
| > by Conrad as the sparse-to-dense conversion no longer works with with a
| > copy. This patch covers it:
| >
| > diff -ru HSAR.orig/src/diagnostics.cpp HSAR/src/diagnostics.cpp
| > --- HSAR.orig/src/diagnostics.cpp 2016-05-24 13:58:45.000000000 -0500
| > +++ HSAR/src/diagnostics.cpp 2017-10-07 13:24:31.471883248 -0500
| > @@ -10,7 +10,7 @@
| >
| > sp_mat SW = I_sp+rho*W+pow(rho,2)*(W*W)+pow(rho,3)*(W*W*W)+pow(rho,4)*
| > (W*W*W*W)+pow(rho,5)*(W*W*W*W*W);
| >
| > - vec d = SW.diag();
| > + vec d(SW.diag());
| >
| > direct = sum( d )/n * betas ;
| > total = accu( SW )/n * betas ;
| >
| >
| > For the other packages, I had less luck as the failures are generally in
| > the
| > tests and often require packages I have not installed (here at home, and
| > for
| > technical I don't currently have access to the machine where I usually run
| > the tests).
| >
| > Sp I would be grateful if the maintainers of packages
| >
| > biglasso, bigstatsr, netdiffuseR, repolr
| >
| > (or also any interested volunteers) could take a peek. It seems of the
| > now
| > over 400 CRAN package using RcppArmadillo, all others are fine too -- and I
| > suspect these four also need only small and simple changes. Happy to
| > discuss
| > here.
| >
| >
| > Cheers, Dirk
| >
| >
| > --
| > http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
| >
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the Rcpp-devel
mailing list