Top Banner
DEVCON | MODCONF 2016 Machine Learning The next revolution or just another hype? Jorge Ferrer - Vice President, Engineering
57

Machine learning the next revolution or just another hype

Apr 16, 2017

Download

Software

Jorge Ferrer
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Machine learning   the next revolution or just another hype

DEVCON | MODCONF 2016

Machine Learning The next revolution or just another hype? Jorge Ferrer - Vice President, Engineering

Page 2: Machine learning   the next revolution or just another hype

What new technologies will have a large impact in the future?

Blockchain Driverless cars

Nanotechnology

Genetic editing

Microservices Containers Serverless

IoT

Machine LearningIs it just hype?

Page 3: Machine learning   the next revolution or just another hype

Getting started with a new technology is always hard

3

Libraries

Terminology

Setup

Toomanyoptions

Math

Lang

Platform

Time

IDE

Don’t worry!We’ve brought a ladder

Page 4: Machine learning   the next revolution or just another hype

The slides are already available!

4tinyurl.com/liferaymlDownload from the App

Page 5: Machine learning   the next revolution or just another hype

What is Machine Learning?

Page 6: Machine learning   the next revolution or just another hype

Technology that allows computers to solve problems that up until now

only humans could solve

Page 7: Machine learning   the next revolution or just another hype

Where was this picture taken?

Is there a bird in it?

Page 8: Machine learning   the next revolution or just another hype

How would you tell apart

… an orange … … from an apple?

Page 9: Machine learning   the next revolution or just another hype

What if you cannot rely on colors?.

Page 10: Machine learning   the next revolution or just another hype

Expert Systems, rule-based, have provided the best results so far…

But often failed in complex problems

Page 11: Machine learning   the next revolution or just another hype

Identify apples and oranges in context

Page 12: Machine learning   the next revolution or just another hype

Machine Learningis nowadays achieving amazing results in very complex problems

Page 13: Machine learning   the next revolution or just another hype

Neural Nets, and Deep Learning in particular, is

providing jaw-dropping ______

Page 14: Machine learning   the next revolution or just another hype

Neural Nets, and Deep Learning in particular, is

providing jaw-dropping results

Page 15: Machine learning   the next revolution or just another hype

Automatic generation of Hemingway texts

He went over to the gate of the café. It was like a country bed. “Do you know it’s been me.” “Damned us,” Bill said. “I was dangerous,” I said. “You were she did it and think I would a fine cape you,” I said. “I can’t look strange in the cab.” “You know I was this is though,” Brett said. “It’s a fights no matter?”

“It makes to do it.” “You make it?” “Sit down,” I said. “I wish I wasn’t do a little with the man.” “You found it.” “I don’t know.” “You see, I’m sorry of chatches,” Bill said. “You think it’s a friend off back and make you really drunk.”

https://medium.com/@ageitgey/machine-learning-is-fun-part-2-a26a10b68df3#.4lmkisdx8

Page 16: Machine learning   the next revolution or just another hype

How do Neural Networks work?

Page 17: Machine learning   the next revolution or just another hype

Artificial Intelligence

Machine Learning

Neural Nets

Deep Learning

Page 18: Machine learning   the next revolution or just another hype

A simple neural net Activation function f(sum(x*w))

Input layer Hidden layer Output layer

X1

X2

X3

X4

W1

W1

W2

W1

W2

W1

W2

W1

Page 19: Machine learning   the next revolution or just another hype

Calculate the price of a house

Area

# of rooms

Size

Age

Price300k 200k

(Backpropagation / Gradient Descent)

A bit less

Page 20: Machine learning   the next revolution or just another hype

Repeat hundredths of thousands of times with a sample set of houses

whose price is known

Hours, Days, Weeks!, Months!!

Page 21: Machine learning   the next revolution or just another hype

Applying the trained model

348k

Area

# of rooms

Size

Age

Price

Page 22: Machine learning   the next revolution or just another hype

Deep LearningMore layers:

• Solves more complex problems

• Exponential increase in time to train

Source: www.parallelr.com

Page 23: Machine learning   the next revolution or just another hype

This is an example of Supervised Learning

Training is done with labelled input data (i.e. during training the desired answer is known)

Page 24: Machine learning   the next revolution or just another hype

Unsupervised LearningInferring a function to describe hidden structure from

unlabelled data

Page 25: Machine learning   the next revolution or just another hype

Defining the network topology is one key challengeOften requires training and testing many of them

25

Page 27: Machine learning   the next revolution or just another hype

EXERCISE

27

1 Try to solve the first dataset with two input variables

2Consider adding on layer and more neurons to the hidden layers

Try to solve the spiral dataset with all input variables

X1 and X2

3Add up to 6 layers with several neurons (more time needed)Try to solve the spiral dataset with just two input variables

Page 28: Machine learning   the next revolution or just another hype

Machine Learning development is more similar to training a dog than it is to how you currently develop

28

Page 29: Machine learning   the next revolution or just another hype

How do I get started?

Page 30: Machine learning   the next revolution or just another hype

Most popular ML technologies

Languages

R

Python

Scala

Java

Lua

Matlab/Octave

Tools & Platforms

Jupyter

Orange

Google Cloud Engine

Amazon ML

Azure ML

Pulsar Modules

Libraries

Spark MLlib

Theano

Caffe

Torch

Tensor Flow

Scikit-learn

Weka

Page 31: Machine learning   the next revolution or just another hype

Languages R

Python Scala

Java

Lua Matlab/Octave

Tools & Platforms Orange Jupyter Google Cloud Engine

Amazon ML

Azure ML

Libraries Spark MLlib Theano Caffe

Torch

Tensor Flow Scikit-learn

Weka

My recommendation to start learning

ForNeuralNets(Deep&Wide)

ManyMLAlgorithms(butnotNeuralNets)

MixofIDEandGoogleDocs

Learnit.It’sworthit.

Page 32: Machine learning   the next revolution or just another hype

Spark Example

Page 33: Machine learning   the next revolution or just another hype

http://spark.apache.org/docs/latest/ml-guide.html

Page 34: Machine learning   the next revolution or just another hype

HOMEWORK ASSIGNMENT #1

34

2You will have to create an account. Don’t be lazy, it’s worth it.

Download the housesalesprediction sample data from kaggle.com and upload it to Jupyter

1 Install the Docker image we have prepared for the exercisedocker run -p 8881:8888 mdelapenya/spark-2-ml Go to http://localhost:8881 to open Jupyter at the running image

3Try adding print and plotting functionsExecute everything or cell by cell (With Shift+Ctrl+-)

Share your progress or ask questions at DockerHub

Page 35: Machine learning   the next revolution or just another hype

http://localhost:8881

Thanks RiccardoThisnotebookisavailableatGitHub

Page 36: Machine learning   the next revolution or just another hype

Tensor Flow Example

Page 37: Machine learning   the next revolution or just another hype

Let’s find the bird!

Page 38: Machine learning   the next revolution or just another hype

tensorflow.org

Page 39: Machine learning   the next revolution or just another hype

http://tflearn.org/samples

Page 40: Machine learning   the next revolution or just another hype

HOMEWORK ASSIGNMENT #2

40

1 Install the Docker image we have prepared for the exercisedocker run -p 8882:8888 jorgeferrer/tflearn-cifar-10 Go to http://localhost:8882 to open Jupyter at the running image

3 You will start to notice how Neural Nets take a long time to train.You might need to take the code out of docker and configure the usage of your NVidia (hopefully you have one)

Tweak the parameters to get better results

2Pay attention to how the neural network is built layer by layer.Try using the TFLearn graph API to print the network

Execute everything or cell by cell (With Shift+Ctrl+-)

Share your progress or ask questions at DockerHub

Page 41: Machine learning   the next revolution or just another hype

http://localhost:8882

ThisnotebookisavailableatGitHub

Page 42: Machine learning   the next revolution or just another hype

Transfer Learning Reuse generic trained models

Page 43: Machine learning   the next revolution or just another hype

Facial recognition

1

Page 44: Machine learning   the next revolution or just another hype

Automatic description of images

Page 45: Machine learning   the next revolution or just another hype

Platforms

Page 46: Machine learning   the next revolution or just another hype

cloud.google.com/ml/

Page 47: Machine learning   the next revolution or just another hype

aws.amazon.com/machine-learning/

Page 48: Machine learning   the next revolution or just another hype

azure.microsoft.com/services/machine-learning/

Page 49: Machine learning   the next revolution or just another hype

Conclusions

Page 50: Machine learning   the next revolution or just another hype

Machine Learning The next revolution or just another hype?

Both!

Page 52: Machine learning   the next revolution or just another hype

Claims that it solves everything!

Analysts will demand it

My product has it. Does yours?

LET’S ADD MACHINE LEARNING!

Soon you will hear…

Page 53: Machine learning   the next revolution or just another hype

How do we protect ourselves from excessive hype?

(And still get the best parts of it)

Page 54: Machine learning   the next revolution or just another hype

Read about it. Play with it

54

It’s not so hard to get started. There are no excuses.But don’t do it just because of the hype.

Page 55: Machine learning   the next revolution or just another hype

Do the homework!

TensorFlow Playground

Spark Machine Learning

TFLearn

Big thanks to Riccardo Ferrari, Eduardo García and Manuel de la Peña

Page 56: Machine learning   the next revolution or just another hype

Read Machine Learning Articles

56

I post my recommendations at https://getpocket.com/@jorge.ferrer

Page 57: Machine learning   the next revolution or just another hype

Ready to do some Machine Learning?

If you liked it, please let me

know!

Thanks!

@jorgeferrer #LRDEVCON