DOSUG Intro to google prediction api


Published on

Gabe and Devon present Regression Analysis using Google Prediction API and numpi. These slides are the Google Prediction API portion.
For the rest see

So you want to predict the future? Oh, just some sentiment analysis, spam detection, stock market predictions? In that case the Google Prediction API is for you. Classification problems, Regression problems. This API is a great tool for any software developer and is easily accessible to anyone who is good with spreadsheets.

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

DOSUG Intro to google prediction api

  1. 1. Regression Analysis & Prediction Devon Jones Lead Systems Engineer, Knewton Gabe Hamilton Software Engineering Mgr, Revionics
  2. 2. Tech Confluence For those who work downtown, check out our DOSUG inspired group. 3rd Wednesday of the month At lunch: 12:30 - 1:30pm
  3. 3. The Plan 1. Regression Analysis - Devon 2. Google Prediction API - Gabe 3. Applying Regression - Devon
  4. 4. Google Prediction API { { "label": "awesome", "score": 0.98 }, "label": "lame", "score": 0.08 } Gabe Hamilton
  5. 5. What kind of Prediction? Predict an output value based on some input values. Things like: Sentiment Analysis, Spam Detection, Today's temperature, GDP Growth
  6. 6. How does Google predict things?
  7. 7. Well, it's Google Through an intensive breeding program Google has managed to distribute Punxsutawney Phils throughout its datacenters across the world. Each Phil is kept in a climate controlled enclosure that mimics the conditions of a perfectly average February 2nd. A full scale digital sundial maps your problem domain onto the shadow matrix of the enclosure allowing each Phil to fully interact with your model. The early spring / long winter emergence probability of each Phil is then sorted and reduced to determine the final result returned by the prediction API.
  8. 8. No Really, How do they do it? Short Answer: I have no idea Long answer: It's a service, they can do whatever works, swap implementations run multiple algorithms
  9. 9. Possible Implementations Regression Analysis Neural Networks Support Vector Machine Monte Carlo Sim Decision Trees Evolutionary Algorithms Basically it is STATISTICS
  10. 10. Types of Prediction you can do Regression Classification How do inputs cause an output to vary? Deciding which bucket some input belongs in Output is a numeric value: Shopping Cart Size Stock Price Buckets are text values: French, Spanish, English
  11. 11. What is Classification good for?
  12. 12. Classification ● ● ● ● ● ● ● ● Sentiment analysis Spam detection Language categorization Tagging Assign priority to bugs Predict movie ratings Message routing decisions <Your brilliant idea here>
  13. 13. Getting Started Hello World page is great
  14. 14. So you have a big pile of data
  15. 15. Time for some cleanup 90% of the development time is data cleanup Good talk on data driven projects http://www.slideshare. net/ryanweald/building-data-drivenproducts-with-ruby-rubyconf-2012
  16. 16. CSV Input file aka Training Set First column is expected values. 2nd through N columns are input values "French", "Je pense donc j'essuie", "Paris" Output an input No header columns more input 250MB max file size
  17. 17. 4 Steps to Prediction 1. Create a CSV file of your training data 2. Create a new Project in the Prediction API a. requires entering billing info 3. Upload your csv file to Google Storage 4. In Prediction API Browser: a. insert a new training set (the csv file) b. view your trained set c. use trainedmodel.predict to make predictions See the hello world for details of the method calls
  18. 18. Let's make some predictions...
  19. 19. Live demo screenshots: List Models
  20. 20. Live demo screens: Analyze Model
  21. 21. Live demo: Predict Model Category
  22. 22. Live demo: Predict Model Numeric
  23. 23. Storage for datasets API Explorer