machine learning the next revolution or just another hype

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

Upload: jorge-ferrer

Post on 16-Apr-2017

548 views

Category:

Software


0 download

TRANSCRIPT

DEVCON | MODCONF 2016

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

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?

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

The slides are already available!

4tinyurl.com/liferaymlDownload from the App

What is Machine Learning?

Technology that allows computers to solve problems that up until now

only humans could solve

Where was this picture taken?

Is there a bird in it?

How would you tell apart

… an orange … … from an apple?

What if you cannot rely on colors?.

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

But often failed in complex problems

Identify apples and oranges in context

Machine Learningis nowadays achieving amazing results in very complex problems

Neural Nets, and Deep Learning in particular, is

providing jaw-dropping ______

Neural Nets, and Deep Learning in particular, is

providing jaw-dropping results

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

How do Neural Networks work?

Artificial Intelligence

Machine Learning

Neural Nets

Deep Learning

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

Calculate the price of a house

Area

# of rooms

Size

Age

Price300k 200k

(Backpropagation / Gradient Descent)

A bit less

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

whose price is known

Hours, Days, Weeks!, Months!!

Applying the trained model

348k

Area

# of rooms

Size

Age

Price

Deep LearningMore layers:

• Solves more complex problems

• Exponential increase in time to train

Source: www.parallelr.com

This is an example of Supervised Learning

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

Unsupervised LearningInferring a function to describe hidden structure from

unlabelled data

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

25

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

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

28

How do I get started?

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

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.

Spark Example

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

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

http://localhost:8881

Thanks RiccardoThisnotebookisavailableatGitHub

Tensor Flow Example

Let’s find the bird!

tensorflow.org

http://tflearn.org/samples

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

http://localhost:8882

ThisnotebookisavailableatGitHub

Transfer Learning Reuse generic trained models

Facial recognition

1

Automatic description of images

Platforms

cloud.google.com/ml/

aws.amazon.com/machine-learning/

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

Conclusions

Machine Learning The next revolution or just another hype?

Both!

Claims that it solves everything!

Analysts will demand it

My product has it. Does yours?

LET’S ADD MACHINE LEARNING!

Soon you will hear…

How do we protect ourselves from excessive hype?

(And still get the best parts of it)

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.

Do the homework!

TensorFlow Playground

Spark Machine Learning

TFLearn

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

Read Machine Learning Articles

56

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

Ready to do some Machine Learning?

If you liked it, please let me

know!

Thanks!

@jorgeferrer #LRDEVCON