Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Java Data Science Cookbook
  • Table Of Contents Toc
Java Data Science Cookbook

Java Data Science Cookbook

By : Shams
close
close
Java Data Science Cookbook

Java Data Science Cookbook

By: Shams

Overview of this book

If you are looking to build data science models that are good for production, Java has come to the rescue. With the aid of strong libraries such as MLlib, Weka, DL4j, and more, you can efficiently perform all the data science tasks you need to. This unique book provides modern recipes to solve your common and not-so-common data science-related problems. We start with recipes to help you obtain, clean, index, and search data. Then you will learn a variety of techniques to analyze, learn from, and retrieve information from data. You will also understand how to handle big data, learn deeply from data, and visualize data. Finally, you will work through unique recipes that solve your problems while taking data science to production, writing distributed data science applications, and much more - things that will come in handy at work.
Table of Contents (10 chapters)
close
close

Classifying data points with Random Forest model using MLib


In this recipe, we will demonstrate how you can classify data points using Random Forest algorithm with MLib.

Getting ready

  1. You will be using the Maven project you created in the recipe named Solving simple text mining problems with Apache Spark. If you have not done so yet, then follow steps 1-6 in the Getting ready section of that recipe.

  2. Go to https://github.com/apache/spark/blob/master/data/mllib/sample_binary_classification_data.txt, download the data, and save as rf-data.txt in the data folder of your project that you created by following the instruction in step 1. Alternatively, you can create a text file named rf-data.txt in the data folder of your project and copy-paste the data from the aforementioned URL.

  3. In the package that you created, create a Java class file named RandomForestMlib.java. Double-click to start writing your code in it.

How to do it...

  1. Create a class named RandomForestMlib:

            public class RandomForestMlib...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Java Data Science Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon