O'Reilly logo

Hadoop Blueprints by Tanmay Deshpande, Anurag Shrivastava

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

Running the Model on Hadoop

We have used BigML for creating the classification tree with the help of historical campaign response data. This model is available in the form of Java code. We can now run this model on Hadoop by using it inside a MapReduce job.

We will need a MapReduce program, which you are already familiar with from the previous chapters of this book. This program is supplied with this book in the directory /hbp/chapt4 as a file named ResponsePrediction.java. This file contains the code for a mapper, reducer, and driver in a single file. The following classes are included in this file:

public class ResponsePrediction {...} public static void main(String[] args) throws Exception { JobConf conf = new JobConf(ResponsePrediction.class); ...

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