A. Code Sketches

This appendix presents the code sketches referred to in the various chapters.

NOTE: The Image character indicates code that didn’t fit on one line and wrapped to the next line.

Code for Naive Bayes PMML Scoring in Spark

This section contains the code for the Naive Bayes Predictive Modeling Markup Language (PMML) support in Spark, as referred to in Chapter 3, “Realizing Machine Learning Algorithms with Spark.”

NaiveBayesHandler.java

package pmml.parser; import java.io.PrintWriter; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; ...

Get Big Data Analytics Beyond Hadoop: Real-Time Applications with Storm, Spark, and More Hadoop Alternatives now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.