Pages

Tuesday, October 6, 2015

HOW TO BUILD MACHINE LEARNING WITH GOOGLE PREDICTION API

While not widely understood, machine learning has been easily accessible since Google Prediction API was released in 2011. With many applications in a wide variety of fields, this tutorial by Alex Casalboni on the Cloud Academy blog is a useful place to start learning how to build a machine learning model using Google Prediction API.

The API offers a RESTful interface as a means to train a machine learning model, and is considered a “black box” due to the restricted access users have to internal configuration. This leaves users with only the “classification” vs “regression” configuration, or the applying of a PMML (Predictive Model Markup Language) file with weighting parameters for categorical models.

This tutorial begins with some brief definitions before beginning on how to upload your dataset to Google Cloud Storage, as required by Google Prediction API. Since this API does not provide a user-friendly Web interface, the tutorial switches to Python scripts via an API call to obtain the modelDescription field, which contains a confusionMatrix structure which informs you how the model behaves.

Google later splits the dataset into two smaller sets; one to train the model, and the second to evaluate it. Users are then shown how to generate new predictions via an API call which returns two values, which are the classified activity and the reliability measure for each class respectively.

The open dataset applied here was built by UCI and will be used to train a multi-class model for HAR (Human Activity Recognition). Collected from accelerometer and gyroscope data on smartphones before being manually labelled, the data is defined by 1 of 6 input activities (walking, sitting, walking up stairs, lying down, etc.). By training the model as instructed here in this tutorial, it will be able to definitively associate sensor data with different activities, such as would be used in activity tracking devices or healthcare monitoring.

Article from http://www.programmableweb.com/news/how-to-build-machine-learning-google-prediction-api/how-to/2015/05/27?utm_content=buffer9fb80&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer

No comments: