CRAN Package Check Results for Package FeatureHashing

Last updated on 2019-03-24 22:49:36 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.9.1.3 65.03 117.87 182.90 OK
r-devel-linux-x86_64-debian-gcc 0.9.1.3 54.14 130.09 184.23 OK
r-devel-linux-x86_64-fedora-clang 0.9.1.3 256.09 OK
r-devel-linux-x86_64-fedora-gcc 0.9.1.3 241.38 OK
r-devel-windows-ix86+x86_64 0.9.1.3 190.00 241.00 431.00 OK
r-patched-linux-x86_64 0.9.1.3 60.70 145.03 205.73 OK
r-patched-solaris-x86 0.9.1.3 275.00 NOTE
r-release-linux-x86_64 0.9.1.3 66.71 135.11 201.82 OK
r-release-windows-ix86+x86_64 0.9.1.3 142.00 192.00 334.00 OK
r-release-osx-x86_64 0.9.1.3 ERROR
r-oldrel-windows-ix86+x86_64 0.9.1.3 156.00 142.00 298.00 ERROR
r-oldrel-osx-x86_64 0.9.1.3 ERROR

Check Details

Version: 0.9.1.3
Check: package dependencies
Result: NOTE
    Package suggested but not available for checking: ‘xgboost’
Flavor: r-patched-solaris-x86

Version: 0.9.1.3
Check: tests
Result: ERROR
     Running ‘test-as-dgCMatrix.R’ [3s/4s]
     Running ‘test-empty_array.R’ [3s/4s]
     Running ‘test-existence_collision.R’ [2s/4s]
     Running ‘test-hash.mapping.R’ [2s/4s]
     Running ‘test-hashing.R’ [3s/4s]
    Running the tests in ‘tests/test-hashing.R’ failed.
    Last 13 lines of output:
     + if (class(e)[1] != "std::invalid_argument") stop(e)
     + if (conditionMessage(e) != "Failed to find the column:PlAnT") stop(e)
     + })
     +
     + m <- hashed.model.matrix(~ Plant:Type:Treatment, CO2, create.mapping = TRUE, signed.hash = TRUE)
     + map <- hash.mapping(m)
     + map <- map[grepl("\\w+:\\w+:\\w+", names(map))]
     + checkTrue(all(hashed.interaction.value(names(map)) %% (2^18) + 1== map),
     + "The hashed.interaction.value gives inconsistent result of hashed.model.matrix")
     + }
     Loading required package: RUnit
     Error in .hashed.model.matrix.dataframe(tf, data, hash.size, transpose, :
     c++ exception (unknown reason)
     Calls: tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
     Execution halted
Flavor: r-release-osx-x86_64

Version: 0.9.1.3
Check: running examples for arch ‘i386’
Result: ERROR
    Running examples in 'FeatureHashing-Ex.R' failed
    The error most likely occurred in:
    
    > ### Name: hashed.model.matrix
    > ### Title: Create a model matrix with feature hashing
    > ### Aliases: hash.sign hashed.interaction.value hashed.model.matrix
    > ### hashed.value
    >
    > ### ** Examples
    >
    > # The following scripts show how to fit a logistic regression
    > # after feature hashing
    > ## Not run:
    > ##D data(ipinyou)
    > ##D f <- ~ IP + Region + City + AdExchange + Domain +
    > ##D URL + AdSlotId + AdSlotWidth + AdSlotHeight +
    > ##D AdSlotVisibility + AdSlotFormat + CreativeID +
    > ##D Adid + split(UserTag, delim = ",")
    > ##D # if the version of FeatureHashing is 0.8, please use the following command:
    > ##D # m.train <- as(hashed.model.matrix(f, ipinyou.train, 2^16, transpose = FALSE), "dgCMatrix")
    > ##D m.train <- hashed.model.matrix(f, ipinyou.train, 2^16)
    > ##D m.test <- hashed.model.matrix(f, ipinyou.test, 2^16)
    > ##D
    > ##D # logistic regression with glmnet
    > ##D
    > ##D library(glmnet)
    > ##D
    > ##D cv.g.lr <- cv.glmnet(m.train, ipinyou.train$IsClick,
    > ##D family = "binomial")#, type.measure = "auc")
    > ##D p.lr <- predict(cv.g.lr, m.test, s="lambda.min")
    > ##D auc(ipinyou.test$IsClick, p.lr)
    > ##D
    > ##D ## Per-Coordinate FTRL-Proximal with $L_1$ and $L_2$ Regularization for Logistic Regression
    > ##D
    > ##D # The following scripts use an implementation of the FTRL-Proximal for Logistic Regresion,
    > ##D # which is published in McMahan, Holt and Sculley et al. (2013), to predict the probability
    > ##D # (1-step prediction) and update the model simultaneously.
    > ##D
    > ##D
    > ##D source(system.file("ftprl.R", package = "FeatureHashing"))
    > ##D m.train <- hashed.model.matrix(f, ipinyou.train, 2^16, transpose = TRUE)
    > ##D ftprl <- initialize.ftprl(0.1, 1, 0.1, 0.1, 2^16)
    > ##D ftprl <- update.ftprl(ftprl, m.train, ipinyou.train$IsClick, predict = TRUE)
    > ##D auc(ipinyou.train$IsClick, attr(ftprl, "predict"))
    > ##D
    > ##D # If we use the same algorithm to predict the click through rate of the 3rd season of iPinYou,
    > ##D # the overall AUC will be 0.77 which is comparable to the overall AUC of the
    > ##D # 3rd season 0.76 reported in Zhang, Yuan, Wang, et al. (2014).
    > ## End(Not run)
    >
    > # The following scripts show the implementation of the FeatureHashing.
    >
    > # Below the original values will be project in a space of 2^6 dimensions
    > m <- hashed.model.matrix(~ ., CO2, 2^6, create.mapping = TRUE,
    + transpose = TRUE, is.dgCMatrix = FALSE)
    >
    > # Print the matrix via dgCMatrix
    > as(m, "dgCMatrix")
    64 x 84 sparse Matrix of class "dgCMatrix"
    Error in isFALSE(suppRows) : could not find function "isFALSE"
    Calls: <Anonymous> -> <Anonymous> -> printSpMatrix2
    Execution halted
Flavor: r-oldrel-windows-ix86+x86_64

Version: 0.9.1.3
Check: running examples for arch ‘x64’
Result: ERROR
    Running examples in 'FeatureHashing-Ex.R' failed
    The error most likely occurred in:
    
    > ### Name: hashed.model.matrix
    > ### Title: Create a model matrix with feature hashing
    > ### Aliases: hash.sign hashed.interaction.value hashed.model.matrix
    > ### hashed.value
    >
    > ### ** Examples
    >
    > # The following scripts show how to fit a logistic regression
    > # after feature hashing
    > ## Not run:
    > ##D data(ipinyou)
    > ##D f <- ~ IP + Region + City + AdExchange + Domain +
    > ##D URL + AdSlotId + AdSlotWidth + AdSlotHeight +
    > ##D AdSlotVisibility + AdSlotFormat + CreativeID +
    > ##D Adid + split(UserTag, delim = ",")
    > ##D # if the version of FeatureHashing is 0.8, please use the following command:
    > ##D # m.train <- as(hashed.model.matrix(f, ipinyou.train, 2^16, transpose = FALSE), "dgCMatrix")
    > ##D m.train <- hashed.model.matrix(f, ipinyou.train, 2^16)
    > ##D m.test <- hashed.model.matrix(f, ipinyou.test, 2^16)
    > ##D
    > ##D # logistic regression with glmnet
    > ##D
    > ##D library(glmnet)
    > ##D
    > ##D cv.g.lr <- cv.glmnet(m.train, ipinyou.train$IsClick,
    > ##D family = "binomial")#, type.measure = "auc")
    > ##D p.lr <- predict(cv.g.lr, m.test, s="lambda.min")
    > ##D auc(ipinyou.test$IsClick, p.lr)
    > ##D
    > ##D ## Per-Coordinate FTRL-Proximal with $L_1$ and $L_2$ Regularization for Logistic Regression
    > ##D
    > ##D # The following scripts use an implementation of the FTRL-Proximal for Logistic Regresion,
    > ##D # which is published in McMahan, Holt and Sculley et al. (2013), to predict the probability
    > ##D # (1-step prediction) and update the model simultaneously.
    > ##D
    > ##D
    > ##D source(system.file("ftprl.R", package = "FeatureHashing"))
    > ##D m.train <- hashed.model.matrix(f, ipinyou.train, 2^16, transpose = TRUE)
    > ##D ftprl <- initialize.ftprl(0.1, 1, 0.1, 0.1, 2^16)
    > ##D ftprl <- update.ftprl(ftprl, m.train, ipinyou.train$IsClick, predict = TRUE)
    > ##D auc(ipinyou.train$IsClick, attr(ftprl, "predict"))
    > ##D
    > ##D # If we use the same algorithm to predict the click through rate of the 3rd season of iPinYou,
    > ##D # the overall AUC will be 0.77 which is comparable to the overall AUC of the
    > ##D # 3rd season 0.76 reported in Zhang, Yuan, Wang, et al. (2014).
    > ## End(Not run)
    >
    > # The following scripts show the implementation of the FeatureHashing.
    >
    > # Below the original values will be project in a space of 2^6 dimensions
    > m <- hashed.model.matrix(~ ., CO2, 2^6, create.mapping = TRUE,
    + transpose = TRUE, is.dgCMatrix = FALSE)
    >
    > # Print the matrix via dgCMatrix
    > as(m, "dgCMatrix")
    64 x 84 sparse Matrix of class "dgCMatrix"
    Error in isFALSE(suppRows) : could not find function "isFALSE"
    Calls: <Anonymous> -> <Anonymous> -> printSpMatrix2
    Execution halted
Flavor: r-oldrel-windows-ix86+x86_64

Version: 0.9.1.3
Check: running tests for arch ‘i386’
Result: ERROR
     Running 'test-as-dgCMatrix.R' [2s]
    Running the tests in 'tests/test-as-dgCMatrix.R' failed.
    Complete output:
     > if (require(RUnit)) {
     + library(FeatureHashing)
     +
     + i <- sample(1:10, 10, TRUE)
     + x <- rnorm(10)
     +
     + i.bak <- integer(10)
     + x.bak <- numeric(10)
     + for(.i in seq_along(i)) {
     + i.bak[.i] <- i[.i]
     + x.bak[.i] <- x[.i]
     + }
     + i.bak
     + FeatureHashing:::pair_sort(i, x)
     + checkTrue(all.equal(x, x.bak[order(i.bak)]),
     + "The result of pair_result is incorrect")
     + checkTrue(all(diff(i) >= 0),
     + "The result of pair_result is incorrect")
     +
     + i <- sample(1:10, 10, TRUE)
     + x <- rnorm(10)
     +
     + FeatureHashing:::pair_sort(i, x)
     + i.bak <- integer(10)
     + x.bak <- numeric(10)
     + for(.i in seq_along(i)) {
     + i.bak[.i] <- i[.i]
     + x.bak[.i] <- x[.i]
     + }
     +
     + tmp <- FeatureHashing:::merge(i, x)
     + checkTrue(isTRUE(all.equal(i[1:tmp], sort(unique(i.bak)))),
     + "The result of C++ pair_sort and merge is incorrect")
     + checkTrue(isTRUE(all.equal(x[1:tmp], local({
     + retval <- sapply(split(x.bak, i.bak), sum)
     + names(retval) <- NULL
     + retval
     + }))),
     + "The result of C++ pair_sort and merge is incorrect")
     +
     + contr <- list(
     + Plant = contrasts(CO2$Plant, contrasts = FALSE),
     + Type = contrasts(CO2$Type, contrasts = FALSE),
     + Treatment = contrasts(CO2$Treatment, contrasts = FALSE)
     + )
     +
     + m4 <- hashed.model.matrix(~ ., data = CO2, hash.size = 2^4,
     + transpose = TRUE, is.dgCMatrix = FALSE)
     +
     + m5 <- as(m4, "dgCMatrix")
     + m6 <- hashed.model.matrix(~ ., data = CO2, hash.size = 2^4,
     + transpose = TRUE)
     + invisible(capture.output(print(m5)))
     + stopifnot(isTRUE(all.equal(dim(m4), dim(m5))))
     + stopifnot(isTRUE(all.equal(sum(m4@x), sum(m5@x))))
     + stopifnot(isTRUE(all.equal(dim(m4), dim(m6))))
     + stopifnot(isTRUE(all.equal(sum(m4@x), sum(m6@x))))
     + for(i in seq_len(dim(m4)[2])) {
     + e1 <- numeric(dim(m4)[2])
     + e1[i] <- 1.0
     + r4 <- m4 %*% e1
     + r5 <- as.vector(m5 %*% e1)
     + r6 <- as.vector(m6 %*% e1)
     + stopifnot(isTRUE(all.equal(r4, r5)))
     + stopifnot(isTRUE(all.equal(r4, r6)))
     + }
     +
     + for(i in seq_len(dim(m4)[1])) {
     + e1 <- numeric(dim(m4)[1])
     + e1[i] <- 1.0
     + r4 <- e1 %*% m4
     + r5 <- as.vector(e1 %*% m5)
     + r6 <- as.vector(e1 %*% m6)
     + stopifnot(isTRUE(all.equal(r4, r5)))
     + stopifnot(isTRUE(all.equal(r4, r6)))
     + }
     + }
     Loading required package: RUnit
     Error in isFALSE(suppRows) : could not find function "isFALSE"
     Calls: capture.output ... print.default -> <Anonymous> -> <Anonymous> -> printSpMatrix2
     Execution halted
Flavor: r-oldrel-windows-ix86+x86_64

Version: 0.9.1.3
Check: running tests for arch ‘x64’
Result: ERROR
     Running 'test-as-dgCMatrix.R' [2s]
    Running the tests in 'tests/test-as-dgCMatrix.R' failed.
    Complete output:
     > if (require(RUnit)) {
     + library(FeatureHashing)
     +
     + i <- sample(1:10, 10, TRUE)
     + x <- rnorm(10)
     +
     + i.bak <- integer(10)
     + x.bak <- numeric(10)
     + for(.i in seq_along(i)) {
     + i.bak[.i] <- i[.i]
     + x.bak[.i] <- x[.i]
     + }
     + i.bak
     + FeatureHashing:::pair_sort(i, x)
     + checkTrue(all.equal(x, x.bak[order(i.bak)]),
     + "The result of pair_result is incorrect")
     + checkTrue(all(diff(i) >= 0),
     + "The result of pair_result is incorrect")
     +
     + i <- sample(1:10, 10, TRUE)
     + x <- rnorm(10)
     +
     + FeatureHashing:::pair_sort(i, x)
     + i.bak <- integer(10)
     + x.bak <- numeric(10)
     + for(.i in seq_along(i)) {
     + i.bak[.i] <- i[.i]
     + x.bak[.i] <- x[.i]
     + }
     +
     + tmp <- FeatureHashing:::merge(i, x)
     + checkTrue(isTRUE(all.equal(i[1:tmp], sort(unique(i.bak)))),
     + "The result of C++ pair_sort and merge is incorrect")
     + checkTrue(isTRUE(all.equal(x[1:tmp], local({
     + retval <- sapply(split(x.bak, i.bak), sum)
     + names(retval) <- NULL
     + retval
     + }))),
     + "The result of C++ pair_sort and merge is incorrect")
     +
     + contr <- list(
     + Plant = contrasts(CO2$Plant, contrasts = FALSE),
     + Type = contrasts(CO2$Type, contrasts = FALSE),
     + Treatment = contrasts(CO2$Treatment, contrasts = FALSE)
     + )
     +
     + m4 <- hashed.model.matrix(~ ., data = CO2, hash.size = 2^4,
     + transpose = TRUE, is.dgCMatrix = FALSE)
     +
     + m5 <- as(m4, "dgCMatrix")
     + m6 <- hashed.model.matrix(~ ., data = CO2, hash.size = 2^4,
     + transpose = TRUE)
     + invisible(capture.output(print(m5)))
     + stopifnot(isTRUE(all.equal(dim(m4), dim(m5))))
     + stopifnot(isTRUE(all.equal(sum(m4@x), sum(m5@x))))
     + stopifnot(isTRUE(all.equal(dim(m4), dim(m6))))
     + stopifnot(isTRUE(all.equal(sum(m4@x), sum(m6@x))))
     + for(i in seq_len(dim(m4)[2])) {
     + e1 <- numeric(dim(m4)[2])
     + e1[i] <- 1.0
     + r4 <- m4 %*% e1
     + r5 <- as.vector(m5 %*% e1)
     + r6 <- as.vector(m6 %*% e1)
     + stopifnot(isTRUE(all.equal(r4, r5)))
     + stopifnot(isTRUE(all.equal(r4, r6)))
     + }
     +
     + for(i in seq_len(dim(m4)[1])) {
     + e1 <- numeric(dim(m4)[1])
     + e1[i] <- 1.0
     + r4 <- e1 %*% m4
     + r5 <- as.vector(e1 %*% m5)
     + r6 <- as.vector(e1 %*% m6)
     + stopifnot(isTRUE(all.equal(r4, r5)))
     + stopifnot(isTRUE(all.equal(r4, r6)))
     + }
     + }
     Loading required package: RUnit
     Error in isFALSE(suppRows) : could not find function "isFALSE"
     Calls: capture.output ... print.default -> <Anonymous> -> <Anonymous> -> printSpMatrix2
     Execution halted
Flavor: r-oldrel-windows-ix86+x86_64

Version: 0.9.1.3
Check: tests
Result: ERROR
     Running ‘test-as-dgCMatrix.R’ [2s/2s]
     Running ‘test-empty_array.R’ [3s/3s]
     Running ‘test-existence_collision.R’ [2s/2s]
     Running ‘test-hash.mapping.R’ [2s/2s]
     Running ‘test-hashing.R’ [2s/2s]
    Running the tests in ‘tests/test-hashing.R’ failed.
    Last 13 lines of output:
     + if (class(e)[1] != "std::invalid_argument") stop(e)
     + if (conditionMessage(e) != "Failed to find the column:PlAnT") stop(e)
     + })
     +
     + m <- hashed.model.matrix(~ Plant:Type:Treatment, CO2, create.mapping = TRUE, signed.hash = TRUE)
     + map <- hash.mapping(m)
     + map <- map[grepl("\\w+:\\w+:\\w+", names(map))]
     + checkTrue(all(hashed.interaction.value(names(map)) %% (2^18) + 1== map),
     + "The hashed.interaction.value gives inconsistent result of hashed.model.matrix")
     + }
     Loading required package: RUnit
     Error in .hashed.model.matrix.dataframe(tf, data, hash.size, transpose, :
     c++ exception (unknown reason)
     Calls: tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
     Execution halted
Flavor: r-oldrel-osx-x86_64