CRAN Package Check Results for Package nnetpredint

Last updated on 2022-04-27 12:55:11 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.2 3.10 50.88 53.98 NOTE
r-devel-linux-x86_64-debian-gcc 1.2 2.39 37.62 40.01 NOTE
r-devel-linux-x86_64-fedora-clang 1.2 58.09 ERROR
r-devel-linux-x86_64-fedora-gcc 1.2 56.40 ERROR
r-devel-windows-x86_64 1.2 33.00 65.00 98.00 NOTE
r-patched-linux-x86_64 1.2 2.90 48.45 51.35 OK
r-release-linux-x86_64 1.2 2.57 48.49 51.06 OK
r-release-macos-arm64 1.2 21.00 OK
r-release-macos-x86_64 1.2 34.00 OK
r-release-windows-x86_64 1.2 30.00 67.00 97.00 OK
r-oldrel-macos-arm64 1.2 23.00 OK
r-oldrel-macos-x86_64 1.2 32.00 OK
r-oldrel-windows-ix86+x86_64 1.2 7.00 58.00 65.00 OK

Check Details

Version: 1.2
Check: Rd files
Result: NOTE
    checkRd: (7) activate.Rd:25-28: \item in \arguments must have non-empty label
    checkRd: (7) activate.Rd:29-32: \item in \arguments must have non-empty label
    checkRd: (7) nnetPredInt.Rd:51-53: \item in \arguments must have non-empty label
    checkRd: (7) nnetPredInt.Rd:54-56: \item in \arguments must have non-empty label
    checkRd: (7) nnetPredInt.Rd:57-59: \item in \arguments must have non-empty label
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: 1.2
Check: examples
Result: ERROR
    Running examples in ‘nnetpredint-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: nnetPredInt
    > ### Title: Prediction Intervals of Neural Networks
    > ### Aliases: nnetPredInt nnetPredInt.default nnetPredInt.nnet
    > ### nnetPredInt.nn nnetPredInt.rsnns
    >
    > ### ** Examples
    >
    > # Example 1: Using the nn object trained by neuralnet package
    > set.seed(500)
    > library(MASS)
    > data <- Boston
    > maxs <- apply(data, 2, max)
    > mins <- apply(data, 2, min)
    > scaled <- as.data.frame(scale(data, center = mins, scale = maxs - mins)) # normalization
    > index <- sample(1:nrow(data),round(0.75*nrow(data)))
    > train_ <- scaled[index,]
    > test_ <- scaled[-index,]
    >
    > library(neuralnet) # Training
    > n <- names(train_)
    > f <- as.formula(paste("medv ~", paste(n[!n %in% "medv"], collapse = " + ")))
    > nn <- neuralnet(f,data = train_,hidden = c(5,3),linear.output = FALSE)
    > plot(nn)
    >
    > library(nnetpredint) # Getting prediction confidence interval
    > x <- train_[,-14]
    > y <- train_[,14]
    > newData <- test_[,-14]
    >
    > # S3 generic method: Object of nn
    > yPredInt <- nnetPredInt(nn, x, y, newData)
    Error in (class(xTrain) %in% c("matrix", "data.frame")) && (class(yTrain) %in% :
     'length = 2' in coercion to 'logical(1)'
    Calls: nnetPredInt -> nnetPredInt.nn -> getPredInt -> checkInput
    Execution halted
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Version: 1.2
Check: tests
Result: ERROR
     Running ‘test1.R’
     Running ‘test2.R’
     Running ‘test3.R’
    Running the tests in ‘tests/test1.R’ failed.
    Complete output:
     > # Example 1: Using the nn object trained by neuralnet package
     > set.seed(500)
     > library(MASS)
     > data <- Boston
     > maxs <- apply(data, 2, max)
     > mins <- apply(data, 2, min)
     > scaled <- as.data.frame(scale(data, center = mins, scale = maxs - mins)) # normalization
     > index <- sample(1:nrow(data),round(0.75*nrow(data)))
     > train_ <- scaled[index,]
     > test_ <- scaled[-index,]
     >
     > library(neuralnet) # Training
     > n <- names(train_)
     > f <- as.formula(paste("medv ~", paste(n[!n %in% "medv"], collapse = " + ")))
     > nn <- neuralnet(f,data = train_,hidden = c(5,3),linear.output = FALSE)
     > plot(nn)
     >
     > library(nnetpredint) # Getting Prediction confidence interval
     > x <- train_[,-14]
     > y <- train_[,14]
     > newData <- test_[,-14]
     >
     > # S3 generic method: Object of nn
     > yPredInt <- nnetPredInt(nn, x, y, newData)
     Error in (class(xTrain) %in% c("matrix", "data.frame")) && (class(yTrain) %in% :
     'length = 2' in coercion to 'logical(1)'
     Calls: nnetPredInt -> nnetPredInt.nn -> getPredInt -> checkInput
     Execution halted
    Running the tests in ‘tests/test2.R’ failed.
    Complete output:
     > # Example 2: Using the nnet object trained by nnet package
     > library(nnet)
     > xTrain <- rbind(cbind(runif(150,min = 0, max = 0.5),runif(150,min = 0, max = 0.5)) ,
     + cbind(runif(150,min = 0.5, max = 1),runif(150,min = 0.5, max = 1))
     + )
     > nObs <- dim(xTrain)[1]
     > yTrain <- 0.5 + 0.4 * sin(2* pi * xTrain %*% c(0.4,0.6)) +rnorm(nObs,mean = 0, sd = 0.05)
     > plot(xTrain %*% c(0.4,0.6),yTrain)
     >
     > # Training nnet models
     > net <- nnet(yTrain ~ xTrain,size = 3, rang = 0.1,decay = 5e-4, maxit = 500)
     # weights: 13
     initial value 35.259828
     iter 10 value 9.646561
     iter 20 value 4.728526
     iter 30 value 3.779644
     iter 40 value 2.472166
     iter 50 value 2.382817
     iter 60 value 2.246882
     iter 70 value 2.189990
     iter 80 value 1.727944
     iter 90 value 1.622836
     iter 100 value 1.609302
     iter 110 value 1.595428
     iter 120 value 1.529652
     iter 130 value 1.418099
     iter 140 value 1.084052
     iter 150 value 0.951194
     iter 160 value 0.935696
     iter 170 value 0.925880
     iter 180 value 0.924930
     iter 190 value 0.924115
     iter 200 value 0.923442
     iter 210 value 0.923399
     iter 220 value 0.923311
     iter 230 value 0.923292
     iter 240 value 0.923289
     iter 250 value 0.923280
     final value 0.923280
     converged
     > yFit <- c(net$fitted.values)
     > nodeNum <- c(2,3,1)
     > wts <- net$wts
     >
     > # New data for prediction intervals
     > library(nnetpredint)
     > newData <- cbind(seq(0,1,0.05),seq(0,1,0.05))
     > yTest <- 0.5 + 0.4 * sin(2* pi * newData %*% c(0.4,0.6))+rnorm(dim(newData)[1],mean = 0, sd = 0.05)
     >
     > # S3 generic method: Object of nnet
     > yPredInt <- nnetPredInt(net, xTrain, yTrain, newData)
     Error in (class(xTrain) %in% c("matrix", "data.frame")) && (class(yTrain) %in% :
     'length = 2' in coercion to 'logical(1)'
     Calls: nnetPredInt -> nnetPredInt.nnet -> getPredInt -> checkInput
     Execution halted
    Running the tests in ‘tests/test3.R’ failed.
    Complete output:
     > # Example 3: Using the rsnns object trained by RSNNS package
     > library(RSNNS)
     Loading required package: Rcpp
     > data(iris)
     > #shuffle the vector
     > iris <- iris[sample(1:nrow(iris),length(1:nrow(iris))),1:ncol(iris)]
     > irisValues <- iris[,1:4]
     > irisTargets <- decodeClassLabels(iris[,5])[,'setosa']
     >
     > iris <- splitForTrainingAndTest(irisValues, irisTargets, ratio=0.15)
     > iris <- normTrainingAndTestSet(iris)
     > model <- mlp(iris$inputsTrain, iris$targetsTrain, size=5, learnFuncParams=c(0.1),
     + maxit=50, inputsTest=iris$inputsTest, targetsTest=iris$targetsTest)
     > predictions <- predict(model,iris$inputsTest)
     >
     >
     > # Generating prediction intervals
     > library(nnetpredint)
     >
     > # S3 Method for rsnns class prediction intervals
     > xTrain <- iris$inputsTrain
     > yTrain <- iris$targetsTrain
     > newData <- iris$inputsTest
     > yPredInt <- nnetPredInt(model, xTrain, yTrain, newData)
     Error in (class(xTrain) %in% c("matrix", "data.frame")) && (class(yTrain) %in% :
     'length = 2' in coercion to 'logical(1)'
     Calls: nnetPredInt -> nnetPredInt.rsnns -> getPredInt -> checkInput
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 1.2
Check: tests
Result: ERROR
     Running ‘test1.R’
     Running ‘test2.R’
     Running ‘test3.R’
    Running the tests in ‘tests/test1.R’ failed.
    Complete output:
     > # Example 1: Using the nn object trained by neuralnet package
     > set.seed(500)
     > library(MASS)
     > data <- Boston
     > maxs <- apply(data, 2, max)
     > mins <- apply(data, 2, min)
     > scaled <- as.data.frame(scale(data, center = mins, scale = maxs - mins)) # normalization
     > index <- sample(1:nrow(data),round(0.75*nrow(data)))
     > train_ <- scaled[index,]
     > test_ <- scaled[-index,]
     >
     > library(neuralnet) # Training
     > n <- names(train_)
     > f <- as.formula(paste("medv ~", paste(n[!n %in% "medv"], collapse = " + ")))
     > nn <- neuralnet(f,data = train_,hidden = c(5,3),linear.output = FALSE)
     > plot(nn)
     >
     > library(nnetpredint) # Getting Prediction confidence interval
     > x <- train_[,-14]
     > y <- train_[,14]
     > newData <- test_[,-14]
     >
     > # S3 generic method: Object of nn
     > yPredInt <- nnetPredInt(nn, x, y, newData)
     Error in (class(xTrain) %in% c("matrix", "data.frame")) && (class(yTrain) %in% :
     'length = 2' in coercion to 'logical(1)'
     Calls: nnetPredInt -> nnetPredInt.nn -> getPredInt -> checkInput
     Execution halted
    Running the tests in ‘tests/test2.R’ failed.
    Complete output:
     > # Example 2: Using the nnet object trained by nnet package
     > library(nnet)
     > xTrain <- rbind(cbind(runif(150,min = 0, max = 0.5),runif(150,min = 0, max = 0.5)) ,
     + cbind(runif(150,min = 0.5, max = 1),runif(150,min = 0.5, max = 1))
     + )
     > nObs <- dim(xTrain)[1]
     > yTrain <- 0.5 + 0.4 * sin(2* pi * xTrain %*% c(0.4,0.6)) +rnorm(nObs,mean = 0, sd = 0.05)
     > plot(xTrain %*% c(0.4,0.6),yTrain)
     >
     > # Training nnet models
     > net <- nnet(yTrain ~ xTrain,size = 3, rang = 0.1,decay = 5e-4, maxit = 500)
     # weights: 13
     initial value 34.732148
     iter 10 value 6.712603
     iter 20 value 5.367890
     iter 30 value 4.478043
     iter 40 value 2.460214
     iter 50 value 1.846668
     iter 60 value 1.635194
     iter 70 value 1.606547
     iter 80 value 1.533162
     iter 90 value 1.512736
     iter 100 value 1.502460
     iter 110 value 1.490264
     iter 120 value 1.446684
     iter 130 value 1.308176
     iter 140 value 1.277720
     iter 150 value 1.267487
     iter 160 value 1.258735
     iter 170 value 1.239051
     iter 180 value 1.215867
     iter 190 value 1.168806
     iter 200 value 1.140475
     iter 210 value 1.114445
     iter 220 value 1.082896
     iter 230 value 1.062121
     iter 240 value 1.042791
     iter 250 value 1.021667
     iter 260 value 1.018142
     iter 270 value 1.011836
     iter 280 value 1.010940
     iter 290 value 1.010566
     iter 300 value 1.010428
     iter 310 value 1.010385
     iter 320 value 1.010357
     iter 330 value 1.010342
     iter 340 value 1.010340
     iter 350 value 1.010339
     final value 1.010338
     converged
     > yFit <- c(net$fitted.values)
     > nodeNum <- c(2,3,1)
     > wts <- net$wts
     >
     > # New data for prediction intervals
     > library(nnetpredint)
     > newData <- cbind(seq(0,1,0.05),seq(0,1,0.05))
     > yTest <- 0.5 + 0.4 * sin(2* pi * newData %*% c(0.4,0.6))+rnorm(dim(newData)[1],mean = 0, sd = 0.05)
     >
     > # S3 generic method: Object of nnet
     > yPredInt <- nnetPredInt(net, xTrain, yTrain, newData)
     Error in (class(xTrain) %in% c("matrix", "data.frame")) && (class(yTrain) %in% :
     'length = 2' in coercion to 'logical(1)'
     Calls: nnetPredInt -> nnetPredInt.nnet -> getPredInt -> checkInput
     Execution halted
    Running the tests in ‘tests/test3.R’ failed.
    Complete output:
     > # Example 3: Using the rsnns object trained by RSNNS package
     > library(RSNNS)
     Loading required package: Rcpp
     > data(iris)
     > #shuffle the vector
     > iris <- iris[sample(1:nrow(iris),length(1:nrow(iris))),1:ncol(iris)]
     > irisValues <- iris[,1:4]
     > irisTargets <- decodeClassLabels(iris[,5])[,'setosa']
     >
     > iris <- splitForTrainingAndTest(irisValues, irisTargets, ratio=0.15)
     > iris <- normTrainingAndTestSet(iris)
     > model <- mlp(iris$inputsTrain, iris$targetsTrain, size=5, learnFuncParams=c(0.1),
     + maxit=50, inputsTest=iris$inputsTest, targetsTest=iris$targetsTest)
     > predictions <- predict(model,iris$inputsTest)
     >
     >
     > # Generating prediction intervals
     > library(nnetpredint)
     >
     > # S3 Method for rsnns class prediction intervals
     > xTrain <- iris$inputsTrain
     > yTrain <- iris$targetsTrain
     > newData <- iris$inputsTest
     > yPredInt <- nnetPredInt(model, xTrain, yTrain, newData)
     Error in (class(xTrain) %in% c("matrix", "data.frame")) && (class(yTrain) %in% :
     'length = 2' in coercion to 'logical(1)'
     Calls: nnetPredInt -> nnetPredInt.rsnns -> getPredInt -> checkInput
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc