Cloud Machine Learning with Google Cloud Platform

Preview:

Citation preview

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

Michal BrysSenior Data Scientist @ MezzobitDevFestPL | Warsaw, 26th November 2016

Cloud Machine LearningIntroduction

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

Michał BryśSenior Data Scientist @ Mezzobit

michalbrys.com@michalbrys

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

Machine Learning - basics

Supervised

i.e. classify object to known pattern.

Unsupervised

i.e. divide set with prior unknown pattern

Reinforcement

algorithm learns to react

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

https://www.wired.com/2016/03/two-moves-alphago-lee-sedol-redefined-future/

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

http://spectrum.ieee.org/cars-that-think/transportation/self-driving/new-pedestrian-detector-from-google-could-make-selfdriving-cars-cheaper

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

Academic / Research

Industry / Applications

Source: Google Next Conference London 2016

Tensor Flow Cloud Machine Learning Machine Learning APIs

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016 Source: Google Next Conference London 2016

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

How can I use it in my projects?

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

Academic / Research

Industry / Applications

Source: Google Next Conference London 2016

Tensor Flow Cloud Machine Learning Machine Learning APIs

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

All you need to start:

Natural Language APIJobs APISpeech APITranslate APIVision API

Cloud Machine Learning Platform

+Compute engine

Cloud Storage

Big Query

Cloud Datalabs

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

Natural Language API

Case study:

Sentiment analysis of hotel reviews

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

Sentiment analysisReview:

The staff was very friendly and I was pleasantly surprised at how clean and refreshing our room was. Great stay!

Score: 0.9ranges between -1.0 (negative) and 1.0 (positive)

Magnitude: 0.9overall strength of emotion within the given text, between 0.0 and +inf

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

Collect hotel reviews (1)scrapy crawl tripadvisor -o hotels.txt -s CLOSESPIDER_ITEMCOUNT=15000

The staff was very friendly and I was pleasantly surprised at how clean and refreshing our room was. Great stay!

Really large apartment fitted out with full size kitchen and appliances (stove, oven, microwave and full size fridge freezer)

...

https://goo.gl/84rTkTCompute engine+ Python, Scrapy

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

Score sentiment of review (2)python sentiment_analysis.py ./resources/hotels.txt Sentence 0 has a sentiment score of 0.1Sentence 1 has a sentiment score of -0.3Sentence 2 has a sentiment score of 0.2Sentence 3 has a sentiment score of 0.5Sentence 4 has a sentiment score of 0.6Sentence 5 has a sentiment score of 0.4...Overall Sentiment: score of 0.5 with magnitude of 72.8

https://goo.gl/DQzkZdCompute engine+ Python, Natural Language API

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

Save results (3)

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

Analyze (4)

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

Analyze (4)

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

● GCP - Powerful platform for data analysis

Summary

● Out-of-the-box trained Machine Learning models○ Natural Language○ Speech ○ Computer Vision

● Use Machine Learning in your apps!

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

quickdraw.withgoogle.com

Michał Bryś, Data Scientist @ Allegro, Complexity Garage @ Kraków, 05.02.2016Michal Brys, Senior Data Scientist @ Mezzobit, DevFestPL 2016

Michal Brys michal.brys@gmail.com@michalbrys

[E-book]: Using Google Analytics with Rmichalbrys.com/book