Regression Analysis & Prediction
Devon Jones
Lead Systems Engineer, Knewton

Gabe Hamilton
Software Engineering Mgr, Revio...
Tech Confluence
For those who work downtown, check out our
DOSUG inspired group.
meetup.com/TechConfluence
3rd Wednesday o...
The Plan
1. Regression Analysis

- Devon

2. Google Prediction API - Gabe
3. Applying Regression

- Devon
Google Prediction API

{

{

"label": "awesome",
"score": 0.98

},

"label": "lame",
"score": 0.08

}

Gabe Hamilton
What kind of Prediction?
Predict an output value based on some input
values.
Things like:
Sentiment Analysis, Spam Detecti...
How does Google predict things?
Well, it's Google
Through an intensive breeding program Google has managed to distribute Punxsutawney Phils
throughout its...
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 i...
Possible Implementations
Regression Analysis
Neural Networks
Support Vector
Machine
Monte Carlo Sim
Decision Trees
Evoluti...
Types of Prediction you can do
Regression

Classification

How do inputs cause
an output to vary?

Deciding which bucket
s...
What is Classification good for?
Classification
●
●
●
●
●
●
●
●

Sentiment analysis
Spam detection
Language categorization
Tagging
Assign priority to bugs
...
Getting Started
Hello World page is great
https://developers.google.com/prediction/docs/hello_world
So you have a big pile
of data
Time for some cleanup
90% of the
development time is
data cleanup

Good talk on data
driven projects
http://www.slideshare...
CSV Input file aka Training Set
First column is expected values.
2nd through N columns are input values
"French", "Je pens...
4 Steps to Prediction
1. Create a CSV file of your training data
2. Create a new Project in the Prediction API
a. requires...
Let's make some predictions...
Live demo screenshots: List Models
Live demo screens: Analyze Model
Live demo: Predict Model Category
Live demo: Predict Model Numeric
Storage for datasets
https://storage.cloud.google.com

API Explorer
https://developers.google.com/apis-explorer/#s/predict...
DOSUG Intro to google prediction api
Upcoming SlideShare
Loading in …5
×

DOSUG Intro to google prediction api

1,312 views

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 https://docs.google.com/presentation/d/1Wtivp7IfUOBxr3wWN0lcw97SQiFkWMLBqgQf_bXgJ0c/edit#slide=id.p10

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

  • Be the first to like this

No Downloads
Views
Total views
1,312
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
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. meetup.com/TechConfluence 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 https://developers.google.com/prediction/docs/hello_world
  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 https://storage.cloud.google.com API Explorer https://developers.google.com/apis-explorer/#s/prediction/v1.6/

×