Slide 1

Slide 1 text

Machine Learning Zero to Hero in GCP Victoria Ubaldo @Vikyale

Slide 2

Slide 2 text

Victoria Ubaldo Data Analyst Management @Interbank Women Techmakers Lima Ambassador @vikyale

Slide 3

Slide 3 text

¿Qué vamos a hablar? ● Introducción a ML ● Cómo empezar con ML ● Tecnologías que emplean para ML ● ML & Google Cloud ● Consejos y tips

Slide 4

Slide 4 text

Introducción a ML

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

La inteligencia artificial (Artificial Intelligence, o AI) es la simulación de procesos de inteligencia humana por parte de máquinas, especialmente sistemas informáticos. Estos procesos incluyen el aprendizaje (la adquisición de información y reglas para el uso de la información), el razonamiento (usando las reglas para llegar a conclusiones aproximadas o definitivas) y la autocorrección.

Slide 7

Slide 7 text

Machine Learning is programming with data.

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Empowering computer systems with the ability to “learn”.

Slide 11

Slide 11 text

tech sport business politics entertainment

Slide 12

Slide 12 text

DATA: UK mobile owners continue to break records with their text messaging, with latest figures showing that 26 billion texts were sent in total in 2004. ? Prediction Model tech sport business politics entertainment

Slide 13

Slide 13 text

7 Steps of Machine Learning 1. Gathering Data 2. Preparing that Data 3. Choosing a Model 4. Training 5. Evaluation 6. Hyperparameter Tuning 7. Prediction

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Machine learning algorithms: - Supervised learning - Unsupervised learning Others: Reinforcement learning, recommender systems.

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

Regresión es predecir un valor, una casa más cercana a un centro comercial y vías principales, regresa un valor en precio más grande, ejemplo 1,000,000 Clasificación es predecir una categoría, se regresa las “clases” o categorías a buscar y en base a eso nos regresa si es “opción 1” o “opción 2”.

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

Cómo empezar con ML

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

GDG Google Cloud ¿Por qué cloud? ● Flexibilidad ● Pago por uso ● Escalabilidad ● Alta disponibilidad ● Administración ● Seguridad ● Ubicuidad, localización

Slide 22

Slide 22 text

GDG Google Cloud ¿Por qué cloud? ● Flexibilidad ● Pago por uso ● Escalabilidad ● Alta disponibilidad ● Administración ● Seguridad ● Ubicuidad, localización

Slide 23

Slide 23 text

La nube no es más que externalizar tu arquitectura y su administración

Slide 24

Slide 24 text

How Can You Get Started with Machine Learning? Three ways, with varying complexity: (1) Use a Cloud-based or Mobile API (Vision, Natural Language, etc.) (2) Use an existing model architecture, and retrain it or fine tune on your dataset (3) Develop your own machine learning models for new problems More flexible, but more effort required

Slide 25

Slide 25 text

Tecnologías a emplear

Slide 26

Slide 26 text

1. Gathering Data Often overlooked, always undervalued

Slide 27

Slide 27 text

Where does your data live?

Slide 28

Slide 28 text

Gathering data from BigQuery

Slide 29

Slide 29 text

SELECT category, TRIM(LOWER(REGEXP_REPLACE( CONCAT(title, ' ', body), r'["\n\'?,]|

|

'," " ))) as text FROM `bigquery-public-data.bbc_news.fulltext` ORDER BY RAND() Gathering data from BigQuery

Slide 30

Slide 30 text

Gathering data

Slide 31

Slide 31 text

2. Preparing that Data Can take a bit longer than expected

Slide 32

Slide 32 text

Our “data” isn’t very organized...

Slide 33

Slide 33 text

coach oscar wednesday oil gadgets animals Building a bag of words model: a simple example Vocabulary Possible labels tech sport business politics entertainment animals measures europe theatre lawyer cats

Slide 34

Slide 34 text

coach oscar wednesday oil gadgets animals Building a bag of words model: a simple example Vocabulary animals electronics europe theatre lawyer cats Inputs gadgets on show at the 2005 consumer electronics show

Slide 35

Slide 35 text

coach oscar wednesday oil gadgets animals Building a bag of words model: a simple example Vocabulary animals electronic s europe theatre lawyer cats Inputs gadgets on show at the 2005 consumer electronics show [ 0 0 0 0 1 0 0 1 0 0 0 0 ]

Slide 36

Slide 36 text

Building a bag of words model: a simple example Labels tech sport business politics entertainment [ 0 1 0 0 0 ]

Slide 37

Slide 37 text

Building a bag of words model: a simple example Labels tech sport business politics entertainment [ 0.01 0.92 0.03 0.02 0.01 ]

Slide 38

Slide 38 text

Building a bag of words model: a simple example Labels tech sport business politics entertainment [ 0.03 0.02 0.04 0.88 0.03 ]

Slide 39

Slide 39 text

3. Choosing a Model Everyone's favorite conversation topic

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

● Open source Machine Learning library ● Especially useful for Deep Learning ● For research and production ● Apache 2.0 license

Slide 42

Slide 42 text

Hello World Image from https://github.com/mnielsen/neural-networks-and-deep-learning ?

Slide 43

Slide 43 text

What we see What the computer “sees”

Slide 44

Slide 44 text

A multidimensional array. A graph of operations. 3 + 2 5

Slide 45

Slide 45 text

Android iOS ... GPU CPU TensorFlow Distributed Execution Engine ... C++ Frontend Python Frontend

Slide 46

Slide 46 text

Android iOS ... GPU CPU TensorFlow Distributed Execution Engine ... C++ Frontend Python Frontend Layers Build models

Slide 47

Slide 47 text

Android iOS ... GPU CPU TensorFlow Distributed Execution Engine ... C++ Frontend Python Frontend Layers Estimator Keras Model Train and evaluate models Build models

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

4. Training Surely machine learning is more than this

Slide 50

Slide 50 text

Test and update model Training Data Model Prediction

Slide 51

Slide 51 text

5. Evaluation Always good to check your work

Slide 52

Slide 52 text

Evaluation Data Prediction Model Calculate accuracy

Slide 53

Slide 53 text

6. Hyperparameter Tuning Adjusting model parameters

Slide 54

Slide 54 text

Training Data Prediction Model Model Model Model Test and update model

Slide 55

Slide 55 text

7. Prediction The reason we did all that work

Slide 56

Slide 56 text

DATA: UK mobile owners continue to break records with their text messaging, with latest figures showing that 26 billion texts were sent in total in 2004. Prediction Model tech

Slide 57

Slide 57 text

ML y Google Cloud

Slide 58

Slide 58 text

Cloud Machine Learning Engine No-ops distributed TF training Efficient, parallelized, hyperparameter search Serve TensorFlow, XGBoost, and scikit-learn models in production

Slide 59

Slide 59 text

Cloud Machine Learning APIs See, Hear and Understand the world

Slide 60

Slide 60 text

Cloud Natural Language Cloud Speech Cloud Translate Cloud Vision

Slide 61

Slide 61 text

Faces Faces, facial landmarks, emotions OCR Read and extract text, with support for > 10 languages Label Detect entities from furniture to transportation Logos Identify product logos Landmarks & Image Properties Detect landmarks & dominant color of image Safe Search Detect explicit content - adult, violent, medical and spoof Cloud Vision API

Slide 62

Slide 62 text

API Usage: Detect Objects in an Image Image Detected Items Vision API Create JSON request with the image or pointer to an image Process the JSON response Call the REST API 1 2 3

Slide 63

Slide 63 text

Confidential & Proprietary Google Cloud Platform 63 Cloud Natural Language API Extract sentence, identify parts of speech and create dependency parse trees for each sentence. Identify entities and label by types such as person, organization, location, events, products and media. Understand the overall sentiment of a block of text. Syntax Analysis Entity Recognition Sentiment Analysis

Slide 64

Slide 64 text

Mobile Vision API Providing on-device vision for applications

Slide 65

Slide 65 text

Face API faces, facial landmarks, eyes open, smiling Barcode API 1D and 2D barcodes Text API Latin-based text / structure Common Mobile Vision API Support for fast image and video on-device detection and tracking. NEW!

Slide 66

Slide 66 text

Text Detection Latin based language Understand text structure Photo credit Getty Images

Slide 67

Slide 67 text

Text Structure Blocks Lines Words Lines Words Words Words

Slide 68

Slide 68 text

Barcode Detection 1D barcodes EAN-13/8 UPC-A/E Code-39/93/128 ITF Codabar 2D barcodes QR Code Data Matrix PDF-417 AZTEC UPC DataMatrix QR Code PDF 417 Video and image credit Google

Slide 69

Slide 69 text

Combined Vision & Translation

Slide 70

Slide 70 text

¿Por dónde empezar?

Slide 71

Slide 71 text

GDG Google Cloud ¡Por dónde empezar! 12 meses 300 $ de crédito gratis para que empieces a utilizar cualquier producto de Google Cloud Platform. Always Free Límites de uso gratuito en los productos que participan en la promoción para los clientes que cumplen los requisitos (durante la prueba gratuita y cuando finalice). La oferta está sujeta a cambios.

Slide 72

Slide 72 text

GDG Google Cloud ¡Por dónde empezar!

Slide 73

Slide 73 text

7 Steps of Machine Learning 1. Gathering Data 2. Preparing that Data 3. Choosing a Model 4. Training 5. Evaluation 6. Hyperparameter Tuning 7. Prediction

Slide 74

Slide 74 text

What’s Next? Codelabs codelabs.developers.google.com/codelabs/cloud-vision-intro/index.html codelabs.developers.google.com/codelabs/cloud-speech-intro/index.html codelabs.developers.google.com/codelabs/cloud-nl-intro/index.html For Developers cloud.google.com/vision/ cloud.google.com/speech/ cloud.google.com/natural-language/ cloud.google.com/translate/ Stack Overflow

Slide 75

Slide 75 text

Mobile Vision: Codelabs and Samples Googly Eyes Code Sample github.com/googlesamples/android-vision/tree/master/visionSamples/googly-eyes Codelabs codelabs.developers.google.com/codelabs/face-detection/ codelabs.developers.google.com/codelabs/mobile-vision-ocr/ Mobile Vision Developers developers.google.com/vision/ GitHub Code Samples github.com/googlesamples/android-vision Stack Overflow Find and ask questions under the android-vision tag.

Slide 76

Slide 76 text

Thanks! Machine Learning Zero to Hero in GCP Victoria Ubaldo @Vikyale