All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Published by Packt Publishing Ltd.
Birmingham B3 2PB, UK.
Credits
Author
John R. Hubbard
Reviewers
Erin Paciorkowski
Alexey Zinoviev
Commissioning Editor
Amey Varangaonkar
Acquisition Editor
Varsha Shetty
Content Development Editor
Aishwarya Pandere
Technical Editor
Prasad Ramesh
Copy Editor
Safis Editing
Project Coordinator
Nidhi Joshi
Proofreader
Safis Editing
Indexer
Tejal Daruwale Soni
Graphics
Tania Dutta
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta
About the Author
John R. Hubbard has been doing computer-based data analysis for over 40 years at colleges and universities in Pennsylvania and Virginia. He holds an MSc in computer science from Penn State University and a PhD in mathematics from the University of Michigan. He is currently a professor of mathematics and computer science, Emeritus, at the University of Richmond, where he has been teaching data structures, database systems, numerical analysis, and big data.
Dr. Hubbard has published many books and research papers, including six other books on computing. Some of these books have been translated into German, French, Chinese, and five other languages. He is also an amateur timpanist.
I would like to thank the reviewers of this book for their valuable comments and suggestions. I would also like to thank the energetic team at Packt for publishing the book and helping me perfect it. Finally, I would like to thank my family for supporting me through everything.
About the Reviewers
Erin Paciorkowski studied computer science at the Georgia Institute of Technology as a National Merit Scholar. She has worked in Java development for the Department of Defense for over 8 years and is also a graduate teaching assistant for the Georgia Tech Online Masters of Computer Science program. She is a certified scrum master and holds Security+, Project+, and ITIL Foundation certifications. She was a Grace Hopper Celebration Scholar in 2016. Her interests include data analysis and information security.
Alexey Zinoviev is a lead engineer and Java and big data trainer at EPAM Systems, with a focus on Apache Spark, Apache Kafka, Java concurrency, and JVM internals. He has deep expertise in machine learning, large graph processing, and the development of distributed scalable Java applications. You can follow him at @zaleslaw
or https://github.com/zaleslaw.
Currently, he's working on a Spark Tutorial at https://github.com/zaleslaw/Spark-Tutorial and on an Open GitBook about Spark (in Russian) at https://zaleslaw.gitbooks.io/data-processing-book/content/.
Thanks to my wife, Anastasya, and my little son, Roman, for quietly tolerating the very long hours I've been putting into this book.
www.PacktPub.com
eBooks, discount offers, and more
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at > for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.
Why subscribe?
- Fully searchable across every book published by Packt
- Copy and paste, print, and bookmark content
- On demand and accessible via a web browser
Customer Feedback
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/1787285650.
If you'd like to join our team of regular reviewers, you can e-mail us at <>
. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!
Preface
"It has been said that you don't really understand something until you have taught it to someone else. The truth is that you don't really understand it until you have taught it to a computer; that is, implemented it as an algorithm." |
-- Donald Knuth |
As Don Knuth so wisely said, the best way to understand something is to implement it. This book will help you understand some of the most important algorithms in data science by showing you how to implement them in the Java programming language.
The algorithms and data management techniques presented here are often categorized under the general fields of data science, data analytics, predictive analytics, artificial intelligence, business intelligence, knowledge discovery, machine learning, data mining, and big data. We have included many that are relatively new, surprisingly powerful, and quite exciting. For example, the ID3 classification algorithm, the K-means and K-medoid clustering algorithms, Amazon's recommender system, and Google's PageRank algorithm have become ubiquitous in their effect on nearly everyone who uses electronic devices on the web.
We chose the Java programming language because it is the most widely used language and because of the reasons that make it so: it is available, free, everywhere; it is object-oriented; it has excellent support systems, such as powerful integrated development environments; its documentation system is efficient and very easy to use; and there is a multitude of open source libraries from third parties that support essentially all implementations that a data analyst is likely to use. It's no coincidence that systems such as MongoDB, which we study in ,