[R] CARET NN Too Much Output Even with Trace=False

Sparks, John j@p@rk4 @ending from uic@edu
Fri Aug 17 19:34:07 CEST 2018


Hi R Helpers,


I am using the Neural Net build in the CARET package and it produces a large amount of output that I don't need to see and interferes with my ability to get to the output that I want to see.  I am using the nnet.trace=FALSE setting, but still getting a disproportionate amount of output from this one procedure.


Is there another option setting that will turn off this output?


Reproducible example is below.  It has a little extra complication in it because I hacked it from a post.  Let me know if I need to do anything to it to make it more use-able.


Many thanks.

--John Sparks


library('caret')
set.seed(1)

data<-read.csv(url('https://datahack-prod.s3.ap-south-1.amazonaws.com/train_file/train_u6lujuX_CVtuZ9i.csv'))

#Imputing missing values using median
preProcValues <- preProcess(data, method = c("medianImpute","center","scale"))
library('RANN')
data_processed <- predict(preProcValues, data)
index <- createDataPartition(data_processed$Loan_Status, p=0.75, list=FALSE)
trainSet <- data_processed[ index,]
testSet <- data_processed[-index,]
fitControl <- trainControl(method = "cv",number = 5,savePredictions = 'final',classProbs = T)

trainSet<-subset(trainSet,select=-c(Loan_ID))
outcomeName<-"Loan_Status"
predictors<-names(trainSet)[!names(trainSet) %in% outcomeName]

NN<-train(trainSet[,predictors],trainSet[,outcomeName],method='nnet',trControl=fitControl,tuneLength=5,nnet.trace=FALSE)



	[[alternative HTML version deleted]]



More information about the R-help mailing list