O'Reilly logo

R Data Analysis Cookbook - Second Edition by Kuntal Ganguly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting ready

If you have not already installed the nnet and caret packages, install them now. Download the data files for this chapter from the book's website and place the banknote-authentication.csv file in your R working directory. We will use class as our target or outcome variable and all the remaining variables as predictors. Using neural networks requires all the independent/predictor variables to be numeric and the dependent variable or outcome to be 0 - 1. However, the nnet function does all the work of generating dummies (contrasts) and correctly handles categorical outcome variables.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required