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

Sparks, John j@p@rk4 @end|ng |rom u|c@edu
Fri Aug 17 19:51:05 CEST 2018

Terrific!  Thanks for the speedy and informative reply.


From: William Dunlap <wdunlap using tibco.com>
Sent: Friday, August 17, 2018 12:45 PM
To: Sparks, John
Cc: r-help using r-project.org
Subject: Re: [R] CARET NN Too Much Output Even with Trace=False

You can use capture.output to store all that tracing information in a character vector instead of having it printed.  You can look at it to diagnose problems or just throw it away.

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

Bill Dunlap
TIBCO Software
wdunlap tibco.com<http://tibco.com>

On Fri, Aug 17, 2018 at 10:34 AM, Sparks, John <jspark4 using uic.edu<mailto:jspark4 using uic.edu>> wrote:
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



#Imputing missing values using median
preProcValues <- preProcess(data, method = c("medianImpute","center","scale"))
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)

predictors<-names(trainSet)[!names(trainSet) %in% outcomeName]


        [[alternative HTML version deleted]]

R-help using r-project.org<mailto:R-help using r-project.org> mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

	[[alternative HTML version deleted]]

More information about the R-help mailing list