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.
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Intro to Google Prediction API
1. Google Prediction API
{ "label": "awesome",
"score": 0.98 },
{ "label": "lame",
"score": 0.08 }
Gabe Hamilton
2. What kind of Prediction?
Predict an output value based on some
input values.
Things like:
Sentiment Analysis, Spam Detection,
Today's temperature, GDP Growth
5. 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.
6. 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
7. Possible Implementations
Regression Analysis But basically it is
Neural Networks
Primary Comp. Analysis STATISTICS
Support Vector Machine
Monte Carlo Sim
Decision Trees
Evolutionary Algorithms
etc, etc
8. Types of Prediction you can do
Regression Classification
How do inputs cause an Deciding which bucket
output to vary? some input belongs in
Output is a numeric Buckets are text values:
value: French, Spanish, English
Shopping Cart Size
Stock Price
GDP
13. Time for some cleanup
90% of the development
time is data cleanup
Great rubyconf talk on
this
http://www.slideshare.
net/ryanweald/building-data-driven-
products-with-ruby-rubyconf-2012
14. 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 more input
No header columns 250MB max file size
15. 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
b. view your trained set
c. use trainedmodel.predict to make
predictions
See the hello world for details of the method
calls