Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Predicting with Google

Predicting with Google

This talk was delivered at Google DevFest by GDG Ahmedabad on 27th December, 2016. This Presentation features Google's Prediction API and what is Machine Learning as a Service on Cloud.

Avatar for Manoranjan Padhy

Manoranjan Padhy

December 27, 2015

Other Decks in Programming

Transcript

  1. Wait, What!? • It is ‘Machine Learning as a Service’

    on Cloud. • Predicts an Output value based upon the entered input like Language, Sentiments, tags e.t.c. • Available as an on demand HTTP RESTful Web Service.
  2. Okay, So What I Do Now!? • Well, pretty much

    the same thing that we do ‘Everyday’ PREDICT! • Starting right from churning a small file of few Kbs to a Big Data Set of 1.5GBs! you can feed them all in form of a CSV. • But! How DO I DO IT!?
  3. How Does it Work? • Follow ‘3 Simple Things’ A.

    Upload B. Train C. Predict • And Life’s Good! Don’t waste it behind ‘Too Much Code’!
  4. A. • Have your date in form of a CSV

    file. Now remember, when I say CSV it doesn’t mean Excel! • Else, just push whatever date you have to the Cloud and make use of the Google Storage API. "english","To err is human, but to really ..." "spanish","No hay mal que por bien no venga." ... Upload to Google Storage gsutil cp ${data} gs://yourbucket/${data}
  5. • Uploading is a pretty much simple process. • Use

    Google Cloud Storage and then fill up the details, select an App Engine Location and you are good to go!
  6. B. • Create a new Model using the training data

    to have accurate predictions. • The Prediction API finds relevant feature from the dataset while the training process • This very features are searched by it later during the Prediction process.
  7. • Above Sample Training Data shares an insight of how

    the Prediction API extracts the features for the Prediction purpose
  8. • Google Prediction API is extracting the features for language

    analysis. English is Blue while Spanish is Red.
  9. • While Training a model, POST prediction/v1.1/training?data=mybucket%2Fmydata • Training runs

    asynchronously so, to see the results, GET prediction/v1.1/training/mybucket%2Fmydata {"data":{ "data":"mybucket/mydata", "modelinfo":"estimated accuracy: 0.xx” }}
  10. C. • Well, finally you are done now! • Your

    model is ready to Predict results with new data. • So, again, how it works!? POST prediction/v1.1/query/mybucket%2Fmydata/predict { "data":{ "input": { "text" : [ “Your Sample Text” ]}} }
  11. • So, let us have a closer look at the

    Workflow of the process above.
  12. Types of Prediction • Regression How input can cause Output

    to vary is seen as well the outputs obtained are Numeric in value. • Classification Need to decide which bucket an output belongs to and buckets are Text values
  13. Capabilities • Data
 Input Features: numeric or unstructured text. Output:

    up to 100s of discrete categories. • Training
 Many machine learning techniques. Automatically selected.
 Performed asynchronously. • Access from many environments
 Web app, mobile app, desktop app. ßProgramming language independent .
  14. Why Use It? • Makes Machine Learning easy to use.

    • Makes every App. Smarter. • Being a web service, can be accessed seamlessly from any Platform. • It also provides strategies for Large Scale Machine Learning
  15. Use Case, • Consider an example of Reddit where we

    will guess the Sub Reddits according to the submissions. • 75MB of JSON-encoded data, comprising 72,986 submissions • This subset made up 42,753 submissions, or about 58% of the original. • Submissions were randomly split into either the training set (98%) or the validation set (2%).
  16. Conclusion • Makes Life a much more ‘Simpler’! • And

    Yes, they too have a ‘Free Module’ in it!
  17. Final Predictions • Today is going to be one of

    the finest day in the DevCon history of Gujarat. • Though the Cold is increasing but the temperature at DevFest will be ‘Warmer’! • Ofcourse, the ‘Food is Awesome’ !