machine learning with r - home - matthewrenze · about me data science consultant education b.s. in...

126
Machine Learning with R @MatthewRenze @netcorebcn

Upload: others

Post on 12-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Machine Learning with R

@MatthewRenze

@netcorebcn

Page 2: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author
Page 3: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author
Page 4: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author
Page 5: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

John

Jane

Miko

Lee

Page 6: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Job Postings for Machine Learning

Source: Indeed.com

Page 7: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Source: Stack Overflow 2017

Average Salary by Job Type (USA)

Page 8: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author
Page 9: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Overview

1. Introduction to ML

2. Introduction to R

3. Classification

4. Regression

5. Beyond the Basics

Page 10: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

About Me

Data Science Consultant

Education

B.S. in Computer Science

B.A. in Philosophy

Community

Public Speaker

Pluralsight Author

Microsoft MVP

ASPInsider

Open-source Software

Page 11: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

How Does This Apply to Me?

Make decisions using data

Make predictions using data

Make recommendations using data

Find patterns of interest in data

Find anomalies in data

Write code that does all these things

Page 12: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author
Page 13: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author
Page 14: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Introduction to Machine Learning

Page 15: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

What is Machine Learning?

Page 16: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Artificial

IntelligenceStatistics

Machine

Learning

Page 17: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

𝑓 𝑥

Page 18: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

DataPredictionFunction

𝑓 𝑥

Page 19: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

DataPredictionFunction

𝑓 𝑥

Page 20: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

DataPredictionFunction

Cat Dog

𝑓 𝑥

Page 21: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

DataPredictionFunction

Cat Dog

𝑓 𝑥

Page 22: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

DataPredictionFunction

Cat Dog Is cat?

𝑓 𝑥

Page 23: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

DataPredictionFunction

Cat Dog Is cat?

𝑓 𝑥

Page 24: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

DataPredictionFunction

Cat Dog Is cat? Yes

𝑓 𝑥

Page 25: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Find a question

Page 26: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Find a question

Prepare the data

Page 27: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Find a question

Prepare the data

Train the model

Page 28: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Find a question

Prepare the data

Train the model

Evaluate the

model

Page 29: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Find a question

Prepare the data

Train the model

Evaluate the

model

Deploy the

model

Page 30: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Find a question

Prepare the data

Train the model

Evaluate the

model

Deploy the

model

Monitor the

model

Page 31: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Find a question

Prepare the data

Train the model

Evaluate the

model

Deploy the

model

Monitor the

model

Page 32: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Data

Page 33: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Data

Training

Test

Page 34: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

ML

Algorithm

Data

Training

Test

Page 35: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

ML

Algorithm

ML

Model

Data

Training

Test

Page 36: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

ML

Algorithm

ML

Model

Data

Training

Test

Page 37: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

ML

Algorithm

ML

Model

Data

Training

Test

New Data

Page 38: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

ML

Algorithm

ML

Model

Data

Training

Test

New Data

Prediction

Page 39: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

What Can Machine Learning Do?

Page 40: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

𝑓 𝑥1.23

Page 41: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Source: Futurama

Page 42: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Introduction to R

Page 43: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

What is R?

Open source

Language and environment

Numerical and graphical analysis

Cross platform

Page 44: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

What is R?

Active development

Large user community

Modular and extensible

9000+ extensions

Page 45: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

FREE

Page 46: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

FREE

Page 47: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author
Page 48: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author
Page 49: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author
Page 50: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Code Demo

Page 51: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Classification

Page 52: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

𝑓 𝑥

Page 53: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Correct Spelling Ratio

Co

un

t o

f S

pa

m W

ord

s

Page 54: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Correct Spelling Ratio

Co

un

t o

f S

pa

m W

ord

s

Page 55: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Correct Spelling Ratio

Co

un

t o

f S

pa

m W

ord

s

Page 56: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Correct Spelling Ratio

Co

un

t o

f S

pa

m W

ord

s

Page 57: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Correct Spelling Ratio

Co

un

t o

f S

pa

m W

ord

s

Page 58: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Correct Spelling Ratio

Co

un

t o

f S

pa

m W

ord

s

Page 59: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Classification Algorithms

k-Nearest Neighbor Classifier

Decision Tree Classifier

Naïve Bayes Classifier

Support Vector Machine

Neural Network Classifier

x1

x2

Page 60: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Decision Tree Classifier

Supervised learning

is sex male?

is age > 9.5?

is family > 2.5?

SurvivedDied

Died

Survived

Page 61: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Decision Tree Classifier

Supervised learning

Tree of decisions

is sex male?

is age > 9.5?

is family > 2.5?

SurvivedDied

Died

Survived

Page 62: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Decision Tree Classifier

Supervised learning

Tree of decisions

Information gain

is sex male?

is age > 9.5?

is family > 2.5?

SurvivedDied

Died

Survived

Page 63: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Decision Tree Classifier

Supervised learning

Tree of decisions

Information gain

Simple and easy

is sex male?

is age > 9.5?

is family > 2.5?

SurvivedDied

Died

Survived

Page 64: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Titanic Passenger Manifest

Name Gender Age Family Survived

Elizabeth Allen Female 29 0 Yes

Hudson Allison Jr. Male 1 3 Yes

Helen Allison Female 2 3 No

Hudson Allison Sr. Male 30 3 No

Bessie Allison Female 25 3 No

… … … …

Page 65: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

is sex male?

is age > 9.5?

is family > 2.5?

SurvivedDied

Died

Survived

Page 66: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Neural Network Classifier

Supervised learning

Source: Wikipedia

Page 67: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Neural Network Classifier

Supervised learning

Neurons in a brain

Source: Wikipedia

Page 68: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Neural Network Classifier

Supervised learning

Neurons in a brain

Complex

Source: Wikipedia

Page 69: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Neural Network Classifier

Supervised learning

Neurons in a brain

Complex

Not transparent

Source: Wikipedia

Page 70: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Real-World Examples

Should we approve this loan?

Will this customer buy from us?

Should we replace this part?

Does this person have cancer?

x1

x2

Page 71: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Iris Data Set

Iris Setosa Iris Versicolor Iris Virginica

Photos by Radomił Binek, Danielle Langlois, and Frank Mayfield

Page 72: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Fisher’s Iris Data

Species Petal Length Petal Width Sepal Length Sepal Width

setosa 1.1 0.1 4.3 3

setosa 1.4 0.2 4.4 2.9

setosa 1.3 0.2 4.4 3

setosa 1.3 0.2 4.4 3.2

setosa 1.3 0.3 4.5 2.3

… … … …

Iris Data Set

Page 73: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Classification Demo

Goal: Predict species based on petal and sepal measurements

Page 74: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Regression

Page 75: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

𝑓 𝑥 1.23

Page 76: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Area

Sa

le P

rice

Page 77: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Sa

le P

rice

Area

Page 78: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Area

Sa

le P

rice

Page 79: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Regression Algorithms

Linear Regression

Polynomial Regression

Lasso Regression

ElasticNet Regression

Neural Network Regression

x1

x2

Page 80: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Simple Linear Regression

Relationship

Page 81: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Simple Linear Regression

Relationship

Linear model

Page 82: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Simple Linear Regression

Relationship

Linear model

Explanatory variable

Page 83: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Simple Linear Regression

Relationship

Linear model

Explanatory variable

Outcome variable

Page 84: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Simple Linear Regression

Linear predictor function

Page 85: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Simple Linear Regression

Linear predictor function

y = m · x + b

Page 86: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Simple Linear Regression

Linear predictor function

y = m · x + b

Parameters estimated

Page 87: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Simple Linear Regression

Linear predictor function

y = m · x + b

Parameters estimated

Relies on assumptions

Page 88: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Neural Network Regression

Same as before

Numeric vs. Categorical

Source: Wikipedia

Page 89: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Real-World Examples

How much profit will we make?

What will the price be tomorrow?

How many will this person buy?

How long until this part fails?

x1

x2

Page 90: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Regression Demo

Goal: Predict petal width of Iris flowers

Page 91: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Beyond the Basics

Page 92: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

This is just the tip of the iceberg!This is just the tip of the iceberg!

Page 93: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Find a question

Prepare the data

Train the model

Evaluate the

model

Deploy the

model

Monitor the

model

Page 94: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Creating accurate and robust models is not easy

Page 95: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Find a question

Prepare the data

Train the model

Evaluate the

model

Deploy the

model

Monitor the

model

Page 96: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Cleaning and Transforming Data

Data are messy

Page 97: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Cleaning and Transforming Data

Data are messy

80% of work

Page 98: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Cleaning and Transforming Data

Data are messy

80% of work

R helps a lot

Page 99: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Cleaning and Transforming Data

Data are messy

80% of work

R helps a lot

Record all steps

Page 100: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Goodness of Fit

Page 101: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Underfit

Goodness of Fit

Page 102: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Underfit Overfit

Goodness of Fit

Page 103: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Underfit Good fit Overfit

Goodness of Fit

Page 104: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Deep Learning

Page 105: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

John

Jane

Miko

Lee

Page 106: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author
Page 107: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

𝑓 𝑥1.23

Page 108: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

𝑓 𝑥1.23

Page 109: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

𝑓 𝑥1.23

Page 110: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Source: YOLO: Real-Time Object Detection

Page 111: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Source: http://grail.cs.washington.edu/projects/AudioToObama/ Source: Nvidia

Page 112: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author
Page 113: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Source: http://grail.cs.washington.edu/projects/AudioToObama/

Page 114: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Source: Pouff - Grocery TripSource: Google Deep Mind

Page 115: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Source: Boston Dynamics

Page 116: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Practical Demo

Goal: Predict who will survive the Titanic

Page 117: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Conclusion

Page 118: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Where to Go Next

Pluralsight: https://www.pluralsight.com

Data Camp: https://www.datacamp.com

Coursera: https://www.coursera.org

Tensorflow: http://playground.tensorflow.org

Page 119: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

www.pluralsight.com/authors/matthew-renze

Page 120: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

www.matthewrenze.com

Page 121: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Feedback

Very important to me!

What did you like?

What could I improve?

Page 122: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Conclusion

1. Introduction to ML

2. Introduction to R

3. Classification

4. Regression

5. Beyond the Basics

Page 123: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author
Page 124: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Are you prepared?

Is your organization?

Is our world prepared?

Page 125: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author
Page 126: Machine Learning with R - Home - Matthewrenze · About Me Data Science Consultant Education B.S. in Computer Science B.A. in Philosophy Community Public Speaker Pluralsight Author

Contact Info

Matthew Renze

Data Science Consultant

Renze Consulting

Twitter: @matthewrenze

Email: [email protected]

Website: www.matthewrenze.com

Thank You! : )