Intro to Google Prediction API

5,221 views

Published on

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
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,221
On SlideShare
0
From Embeds
0
Number of Embeds
70
Actions
Shares
0
Downloads
70
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Intro to Google Prediction API

  1. 1. Google Prediction API{ "label": "awesome", "score": 0.98 },{ "label": "lame", "score": 0.08 } Gabe Hamilton
  2. 2. What kind of Prediction?Predict an output value based on someinput values.Things like:Sentiment Analysis, Spam Detection,Todays temperature, GDP Growth
  3. 3. How does Google predict things?
  4. 4. Well, its GoogleThrough an intensive breeding program Google has managed to distribute Punxsutawney Philsthroughout its datacenters across the world. Each Phil is kept in a climate controlled enclosure thatmimics the conditions of a perfectly average February 2nd. A full scale digital sundial maps yourproblem domain onto the shadow matrix of the enclosure allowing each Phil to fully interact withyour model. The early spring / long winter emergence probability of each Phil is then sorted andreduced to determine the final result returned by the prediction API.
  5. 5. No Really, How do they do it?Short Answer: I have no ideaLong answer:Its a service, they cando whatever works,swap implementationsrun multiple algorithms
  6. 6. Possible ImplementationsRegression Analysis But basically it isNeural NetworksPrimary Comp. Analysis STATISTICSSupport Vector MachineMonte Carlo SimDecision TreesEvolutionary Algorithmsetc, etc
  7. 7. Types of Prediction you can doRegression ClassificationHow do inputs cause an Deciding which bucketoutput to vary? some input belongs inOutput is a numeric Buckets are text values:value: French, Spanish, English Shopping Cart Size Stock Price GDP
  8. 8. What is Classification good for?
  9. 9. Classification● Sentiment analysis● Spam detection● Language categorization● Tagging● Assign priority to bugs● Predict movie ratings● Message routing decisions● <Your brilliant idea here>
  10. 10. Getting StartedHello World page is greathttps://developers.google.com/prediction/docs/hello_world
  11. 11. So you have a big pile of data
  12. 12. Time for some cleanup90% of the developmenttime is data cleanupGreat rubyconf talk onthishttp://www.slideshare.net/ryanweald/building-data-driven-products-with-ruby-rubyconf-2012
  13. 13. CSV Input file aka Training SetFirst column is expected values.2nd through N columns are input values"French", "Je pense donc jessuie", "Paris"Output an input more inputNo header columns 250MB max file size
  14. 14. 4 Steps to Prediction1. Create a CSV file of your training data2. Create a new Project in the Prediction API a. requires entering billing info3. Upload your csv file to Google Storage4. In Prediction API Browser: a. insert a new training set b. view your trained set c. use trainedmodel.predict to make predictionsSee the hello world for details of the methodcalls
  15. 15. Lets make some predictions...
  16. 16. Storage for datasetshttps://storage.cloud.google.comAPI Explorerhttps://developers.google.com/apis-explorer/#s/prediction/v1.5/

×