The Google Prediction API exposes Google’s machine learning algorithms as a RESTful API for use by applications around the web. This allows developers to replace repetitive manual processes with automated and smarter code, saving users valuable time and preventing headaches. The Prediction API first launched in at I/O 2010 and the team recently added a number of enhancements that make it more powerful for many types of business applications.
What can the Prediction API do?
The basic job of machine learning is to recognize historical patterns in data and use those patterns to make intelligent predictions in the future.
Some great use cases:
- Spam detection: Does your product allow users to submit content? Do some users abuse this opportunity by submitting spam? Instead of maintaining a large number of regular expressions trying to catch common types of spam, you can use the Prediction API to automatically detect it and react accordingly.
- Sentiment analysis: Are you building a CRM that keeps track of exchanges with customers? You could use the Prediction API to analyze correspondence with customers and detect when a customer might be communicating with a really negative or positive tone. This can alert you to when you might need to improve a relationship or even start writing a customer success story.
- Tagging & organizing: Does your application store a lot of unstructured content? You can provide organization for this content by automatically tagging it based on how your users have previously tagged similar content.
- Message routing: If you have a CRM that needs to route leads to the most appropriate people or a helpdesk ticket system that needs to route tickets to the correct support team, the Prediction API can help. Instead of writing a set of rules for which leads or tickets get routed to which people, use machine learning to predict the routing based on historical patterns.
On example: We built a demo app that uses the Prediction API to predict what types of applications a company might want to add from the Google Apps Marketplace based on the demographics of the company and a sampling of previous install data.
You can also try out some pre-built demonstration models in the Hosted Model Gallery.
How does it work?
- Upload training data to Google Storage. Training data is formatted as a CSV file with the first column representing the result (categorical or real-valued) and the remaining columns representing separate features contributing to the result.Example for predicting the size of a person in meters:
“Height in meters”, “Gender”, “Father’s height”, “Mother’s height”, “Country of origin”
- Train a model based on the uploaded data. You only need to make a single REST call to start the asynchronous training process.
- Predict results based on new data
- (Optional) Tune the training model with new results. If you have new training data, you can now add it to your existing model to tune it.
- (Optional) Make your model available to others via the forthcoming Hosted Model Gallery.