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 do not already have the e1071 and caret packages, install them now. Download the data files for this chapter from the book's website and place the electronics-purchase.csv file in your R working directory. Naive Bayes requires all the variables to be categorical. So, if needed, you should first convert all variables accordingly--refer to the Binning numerical data recipe in Chapter 1, Acquiring and Preparing the Ingredients - Your Data.

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