Over a million developers have joined DZone.

How to Get Started With Java Machine Learning

Thought Java wasn't cool enough to do machine learning? You were wrong! Learn how to get started with these projects and libraries.

· Java Zone

What every Java engineer should know about microservices: Reactive Microservices Architecture.  Brought to you in partnership with Lightbend.

What are the Best Tools to Get Started With Java Machine Learning?

They’ve been around for awhile, but these days it feels like everyone is talking about artificial intelligence and machine learning. It’s no longer a secret reserved to scientists and researchers, with implementations in nearly every new emerging technology.

In the following post, we’ll do a quick overview of the main Java machine learning frameworks, and show how easy it is to get started—without reinventing the wheel and creating your own algorithms from scratch.

AI for the People

AI is a wide and cool field that has been around for a while, but always felt a little bit out of reach and made especially for scientists. If you wanted to create an AI system, you had to implement the core algorithms on your own and train them to identify patterns, understand images, and process natural language.

The recent buzz and evolvement around this field made it more accessible for non-researchers. Now, you have easy access to the relevant algorithms and tools. You do have to know what you’re doing, but it’s a lot easier to enhance your applications with machine learning capabilities.

Getting the Machine Going

To make things simpler, we decided to highlight three projects to help get you started:

  1. Deeplearning4J (DL4J) – Open source, distributed, and commercial-grade deep-learning library for JVM
  2. BID Data Project – A collection of patterns that enable fast, large-scale machine learning and data mining
  3. Neuroph – Object-oriented neural network

By the way, we recently published another list of interesting open source GitHub libraries that caught our attention. Check it out.

DL4J – Deep Learning

DL4J is a tool made to assist you in the process of configuring deep neural networks which are made of multiple layers. It brings deep learning to the JVM along with fast prototyping and customization at scale, while focusing on more convention than configuration.

This is the tool for those who already have the theory needed to create and use deep neural networks, but don’t want to actualize the algorithms themselves. You can use it to solve specific problems involving massive amounts of data and customize the neural net properties.

DL4J is written in Java, which makes it compatible with any JVM language such as Clojure, Scala, or Kotlin, and it integrates with Hadoop and Spark.

Possible use cases include rating or recommendation systems (CRM, adtech, churn prevention), predictive analytics, or even fraud detection. If you’re looking for a real-world example, you can check out Rapidminer. It’s an open-source data platform that uses DL4J to streamline predictive analytics processes for their users.

Setting up a new neural network is as easy as creating a new object.

BID Data Project

The BID Data Project is made for those of you who deal with a great amount of data and are performance sensitive. This UC Berkeley project is a collection of hardware, software, and design patterns that enable fast and large-scale data mining.

The first library is BIDMach, that holds the records for many common machine learning problems, on single nodes or clusters. You can use it to manage data sources, optimize, and distribute data over CPUs or GPUs.

It includes many popular machine learning algorithms, and the team is working on developing distributed Deep Learning networks, graph algorithms, and other models.

The other two libraries are BIDMat, a fast matrix algebra library that focuses on data mining and BIDParse, GPU-accelerated natural language parser. Other libraries in this project include visualization tools, along with libraries that will let you run on Spark or even on Android.

BIDMach benchmarks repeatedly show better results than other solutions, even with a single machine compared to alternatives running on larger clusters. A full list of benchmarks can be found right here.

Neuroph

Neuroph is a lightweight Java framework used to develop common neural network architectures. The framework provides a Java library along with a GUI tool (called easyNeurons), and you can use it in order to create and train your very own neural networks in Java programs.

It contains an open source Java library, with a small number of basic classes which correspond to essential neural network concepts. It’s a great stepping stone if you’re just getting started with neural networks, or if you want to know how they work.

You can try out Neuroph online demo and see how it actually works. Spoiler alert: The interface looks old and outdated, but you can create nice things with it. Also, it received the Duke’s Choice Award for 2013.

Neuroph-Neural-Network

Network Graphic View

What About the Others?

In case these three projects are not your cup of tea and you’re looking for something a little different for your project, don’t worry. If you search GitHub for “Machine learning,” you’ll find 1,506 Java repositories that might give you the right tool.

For example, an interesting project from Airbnb is aerosolve; a machine learning library designed to be human friendly.

Getting started with a new technology is always a source for trouble. If you will need some help with your exceptions, be sure to check out Takipi’s error analysis tool.

Final Thoughts

Every few years there’s a new buzz around AI. This time around, it came with reinforcement in the form of machine learning, data mining, neural networks, and so on and we’re all for it. The fact that these libraries are open sourced means that information and abilities are up for grabs, and all you have to do is think what can be done with this power.

If you know other interesting projects or think we missed anything, we would love to hear about it in the comments below.

Microservices for Java, explained. Revitalize your legacy systems (and your career) with Reactive Microservices Architecture, a free O'Reilly book. Brought to you in partnership with Lightbend.

Topics:
java ,data mining ,neural networks ,machine learning ,deep learning

Published at DZone with permission of Henn Idan, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}