Back

Top 6 Most Popular Machine Learning API’s

Have you heard of machine learning? If you’ve ever used the internet before, your answer is probably yes. Seen as a buzzword by many, machine learning—together with big data, artificial intelligence, and virtual reality—is currently one of the most widely discussed concepts in the technology community.

Buzzword or not, machine learning has long since become something we use every day, one way or another. It’s working behind the scenes in most of our mobile apps, under the hood of most websites we visit, and is employed by the brands and service providers with whom we interact.

The ubiquity of machine learning has led to the creation of a number of ways to quickly and easily integrate it into virtually any application. On the flip side, it has become even more important to understand clearly what machine learning is, what it isn’t, and where it should be applied to achieve the best results.

We’ve also made a PDF-version of this article. Download

Simple Explanation of Machine Learning

The concept of machine learning, as it’s being used in smart applications today, is basically a way of making  highly accurate predictions of the future using data (as in Big Data) from the past. This can take various forms, from article recommendations on newspapers’ websites, to fraud detection in online stores, to sentiment analysis of interaction on social networks.

Since machine learning is often intertwined with the concept of artificial intelligence (AI), it’s also quite important to understand the difference between the two. In fact, machine learning is a subset of artificial intelligence, which, in turn, is the concept that a computer can learn to do anything a human can.

machine learning and AI

As opposed to AI, machine learning algorithms don’t necessarily act by itself, but rather works with data and supplies certain conclusions and predictions based on its analysis. The core of machine learning consists of a wide variety of algorithms, which should be chosen according to the nature of the task at hand and “trained” with data from the past.

75 and 25 percent dependance

This past data is also crucial for validating  the predictions: normally 75% of the available data would be used for prediction, which would then be compared to the remaining 25%. This way, one can fine-tune the algorithms by trying to “predict” the past.

Time to act

There’s been no better time to start implementing machine learning in all kinds of applications, Google’s Aparna Chennapragada argued in her talk at the recent TNW Europe conference. The evolution of the internet has meant that data has reached a different order of magnitude to what it was ten years ago, with videos, photos, social media posts, and online behaviour data generated by billions of users.

At the same time, most people now have ambient access to enormous computing power. The mobile paradigm changes and enhances the way we interact with our environment—thanks, in no small measure, to machine learning and artificial intelligence algorithms. With huge amounts of data and so many computers at hand, now is the best time to build smart applications, which can help users achieve more and make their everyday lives easier.

One good thing about building smart applications with machine learning is that almost every problem today can be solved with software. These new solutions include entertainment at home, transportation and dispatching cars through traffic, monitoring health and fitness, and so on.

“If you’re building a product now that solves a real world problem, chances are you will need to work with information problems, and you’ll have to figure out how to get it right,” Chennapragada said.

With the wide variety of information problems we’re facing, it’s important to recognise  those cases where machine learning would be an efficient solution. The perfect problem in this case would be one that’s hard for a human to solve, but easy for the machine.

A good example is machine translation. Despite not always being 100% accurate, it satisfies users in most cases, since without the machine they wouldn’t be able to translate at all. On the other hand, inaccurate speech recognition is quite frustrating, as the user can actually type the query manually. The easier the problem is for a human, the more difficult it becomes to satisfy your users with a machine learning-based solution.

Werner Vogels, the CTO of Amazon, gave another good example of the use of machine learning in his talk at TNW Conference. The online retail behemoth uses algorithms to fight the paradox of choice, which is that after a certain number of options, the increase in choice actually makes customers less happy.

“If there are only three kinds of toothpaste, you choose one and you’re happy with your choice,” Vogels said. “But if there are 50, you get confused. You need to make a choice, but you’re not sure you’ve chosen the best one. It’s a big driver for unhappiness.

“This is important in grocery stores, but even more important online: we have not 50, but 5,000 toothpastes. Personalisation with machine learning helps reduce choices and make users happier.”

The secret sauce

Personalisation is another requirement that Chennapragada listed amongst the most important features of a smart application. Although there’s no universal formula for a successful product in this field, there is something that the app creators should keep in mind for reference:

AI-plus-I

Artificial intelligence and user interface need little explanation, and “I” means that the product has to adapt to the needs of every user in every scenario. Knowing your audience and their needs is key, and a failure to fulfil these needs  inevitably leads to the product being abandoned.

In addition to knowing the audience, it’s important to be able to show your users the benefits of your smart application early on, Chennapragada added. A good example of that is Google-owned Waze that uses machine learning and real-time data to predict traffic jams and navigate the user around them. The app adds value from the very first time it’s launched on the phone—and that’s something worth aiming for.

A big part of Chennapragada’s advice on building smart applications with machine learning algorithms can be boiled down to “don’t frighten your user” and “don’t screw up in mission critical tasks.” In particular, customers would generally prefer having a predictable interface over saving some time; for example, Google’s team at some point came up with an algorithm that could dynamically change the icon grid on the smartphone to highlight the apps that the customer was more likely to need at any given moment. The feature never went live.

Overall, the rule of thumb when it comes to building UI for smart apps is that its simplicity should be proportionate to your confidence in AI. Whenever you’re not entirely sure that the AI has got your user’s intention correctly, let the latter clarify it further. The more training your algorithms receive this way, the better they become in the future.

Starting up

With machine learning gaining popularity across industries, it is slowly but surely becoming as ubiquitous as computing itself. In fact, you don’t even need to have an in-depth knowledge of coding or computer science to introduce it into your app. With machine learning tools released by a number of companies it can be done within an hour, provided you have sufficient data to start with.

Recently we ran an overview of APIs for natural language processing, most of which employ machine learning algorithms. Let’s take a look at some of the most popular solutions you can use for other aspects of your new smart applications.

Amazon Machine Learning

Adding a data source for a model on Amazon ML

Adding a data source for a model on Amazon ML

The retail giant offers a cloud-based machine learning service that it claims is similar to what is used within the company for all sorts of predictions. Examples of possible uses for this product are fraud detection, content personalisation, document classification, and customer churn prediction.

The API comes with SDKs for Java, .NET, Python, PHP, Node.js, and Ruby. Amazon provides ample documentation for the product, which could, nevertheless be slightly  difficult for a non-programmer to follow in some cases. In combination with the Amazon Web Services (AWS) cloud, the solution can scale to “generate billions of predictions daily, and serve those predictions in real-time and at high throughput.”

Amazon Machine Learning API charges $0.42 per hour of computing while analysing your data and building models. After that, you’ll need to pay $0.10 per 1,000 predictions if purchased in a batch, or $0.0001 per real-time prediction. The API is not available on the AWS free tier, which means that you might need to pay for it separately.

Microsoft Azure ML

Azure ML’s visual model editor

Another offering crafted by a major tech corporation, Azure ML is part of a bigger Cortana Intelligence Suite. Similarly to Amazon’s product, it offers a visual interface that makes it easier to build and train models, and choose algorithms to use.

The product is centred around the Machine Learning Studio, a framework for creation of modular solutions of your own. In addition to documentation, there’s a sizeable gallery of all kinds of examples and experiments that show different use cases for the service. These include demand estimation, credit risk prediction, sentiment analysis, and hundreds of other applications.

As for the pricing, Microsoft charges a flat monthly fee of $9.99 per workplace—so-called “seat subscription”—as well as additional fees of $1 per hour of experimenting in Studio, $2 per hour of computation with production API, and $0.50 per 1,000 production API transactions.

Google Cloud Prediction API

Uploading training data in a simple model in Google’s Prediction API

Like its  competitors, Google offers a cloud-based machine learning solution for everyone to play with. Among possible use cases are customer sentiment analysis, spam detection, recommendation systems, and more. There are a few comprehensive how-to guides on creating basic models for these cases that will help you get started.

In addition to the how-tos, Google offers a quite simple developer’s guide to the API, which goes through syntax and generally explains how the whole thing works.

Prediction API offers customers a free quota of 100 predictions, 5MB of trained data, and 100 streaming updates per day—with a lifetime cap of 20,000 predictions. In the paid tier, you will be charged $10 a month per Google Cloud Platform Console project, which will give you 10,000 predictions and streaming updates. Beyond those, you’ll pay $0.50 per 1,000 predictions, $0.05 per 1,000 streaming updates, and $0.002/MB of data trained.

BigML

BigML model dashboard

BigML model dashboard

Catering to all kinds of users, from hobbyist developers to enterprises, BigML offers a flexible and well documented machine learning API. Its use cases include market basket analysis, customer segmentation, and predictive maintenance.

For users not closely familiar with machine learning, there’s a small gallery of user scripts to help you get started. The documentation includes a comprehensive quick start manual that guides the user through the main steps, from feeding the data into the algorithm, to creating a model, to requesting a prediction.

BigML offers a choice of subscriptions priced from $30 to $300 a month, as well as the pay-as-you-go model where you’re charged per MB of training data, model size, and number of predictions.

In addition to its cloud-based solution, BigML offers the  possibility of deploying the machine learning system on-premise for enterprise customers.

PredictionIO

Algorithm selection dialog in PredictionIO

Algorithm selection dialog in PredictionIO

Apparently addressing the audience of developers who would like to be in control of their machine learning deployment, PredictionIO is an open source server that allows users to quickly build predictive engines. The company was acquired by Salesforce in February, but promised that the technology would remain free and open source indefinitely.

PredictionIO offers SDKs for Java (and Android), PHP, Python, and Ruby. There are also a few community-powered SDKs, including ones for Node.js, C#/.NET, Swift, and more. It also hosts a gallery of engine templates for different kinds of tasks, which would help get your app up and running in no time.

AlchemyAPI

AlchemyAPI language analysis example

AlchemyAPI language analysis example (credit: NYC Data Science Academy)

Similarly to PredictionIO, AlchemyAPI began as a startup, but was later acquired by a large corporate. In 2015, IBM purchased the company, planning to integrate its solutions into the Watson platform.

The original API, however, is still available and can be used together with IBM’s cloud platform Bluemix. We mentioned the Alchemy Language API in the recent natural language processing round-up, but there’s more to it than just this one use case.

AlchemyAPI offers a machine learning based Visual Recognition API, as well as the recently launched AlchemyData News API. The latter provides an interesting solution for media analysis:

“AlchemyData News indexes 250k to 300k English language news and blog articles every day with historical search available for the past 60 days. You can query the News API directly with no need to acquire, enrich and store the data yourself – enabling you to go beyond simple keyword-based searches.”

The Visual Recognition API allows users to classify 250 images per day and train a custom classifier using 1000 images for free. Beyond that, users will be charged pay-as-you-go fees for face recognition, image classification, etc. Some of the features will be free to use until July 1, so hurry up if you’d like to play with the API and decide if it’s for you.

Give it a try. It only takes a click to unsubscribe.

Summary

With the growing number of reasonably priced and easy-to-set-up solutions, it’s simpler than ever before for app developers to find something that fits their needs perfectly. Following the advice of Werner Vogels, we’ve only mentioned a few well-tried options, which represent a mere fraction of the wide variety of products available.

If you’ve added machine learning into your application with any of the APIs we mentioned above, or using an alternative, please share your hands-on experience in the comments section.

Read more:

June 23, 2016

machine learning