The binary classification model

The code from the previous section creates a new file called predict.csv in the dunnhumby folder. This dataset has a single row for each customer with a 0/1 field indicating whether they visited in the last two weeks and predictor variables based on sales data before those two weeks. Now we can proceed to build some machine learning models. The Chapter4/binary_predict.R file contains the code for our first prediction task, binary classification. The first part of the code loads the data and creates an array of  predictor variables by including all columns except the customer ID, the binary classification predictor variable, and the regression predictor variable. The feature columns are all numeric fields that ...

Get Deep Learning with R for Beginners now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.