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