the essentials of effective machine learning...experienced machine learning practitioner capable of...

148
The Essentials of Effective Machine Learning

Upload: others

Post on 20-May-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

The Essentials of Effective Machine Learning

Page 2: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Scott ErnstDirector of Data

Science & Engineering

Page 3: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Reinventing Employee Scheduling Software

A better, happier, more efficient hourly workforce

Page 4: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Computational Astrophysics

What happens

when stars collide?

“Magnetohydrodynamic Shock-wave Stability Simulations”

Page 5: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

ML-Enhanced CG Animation & VFX

Can CG Characters

Walk without Animators?

“Supervised & Unsupervised Behavioral Character Locomotion”

Page 6: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Application: Dinosaurs

How did they

really move?

Page 7: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Dinosaur Data Science“Predict behavioral information from massive tracksite in Switzerland”

Page 8: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Excavation Site Map

Page 9: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

What to do?

● No Legacy Constraints

● Freedom of Choice

● Support from Leadership

● Help from Peers

Page 10: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

The Essentials of Effective Machine Learning

Page 11: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Machine LearningA very real example

Page 12: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_data()1

The Very Real Example

Page 13: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_data()

model = Model()

1

2

The Very Real Example

Page 14: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_data()

model = Model()

model.fit(data.training_features, data.training_labels)

1

2

3

The Very Real Example

Page 15: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_data()

model = Model()

model.fit(data.training_features, data.training_labels)

predictions = model.predict(data.testing_features)

1

2

3

4

The Very Real Example

Page 16: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_data()

model = Model()

model.fit(data.training_features, data.training_labels)

predictions = model.predict(data.testing_features)

correct = count_correct(

expected=data.testing_labels,

predicted=predictions

)

1

2

3

4

5

The Very Real Example

Page 17: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_data()

model = Model()

model.fit(data.training_features, data.training_labels)

predictions = model.predict(data.testing_features)

correct = count_correct(

expected=data.testing_labels,

predicted=predictions

)

print(f'Accuracy: {100 * correct / len(predictions):,.2f}%')

1

2

3

4

5

6

The Very Real Example

Page 18: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

$ python example.py

Accuracy: 94.74%

The Very Real Example

Page 19: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

VictoryMachine Learning is Easy!

Page 20: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_data()

model = Model()

model.fit(data.training_features, data.training_labels)

predictions = model.predict(data.testing_features)

correct = count_correct(

expected=data.testing_labels,

predicted=predictions

)

print(f'Accuracy: {100 * correct / len(predictions):,.2f}%')

1

2

3

4

5

6

The Very Real Example

Page 21: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_data()

model = FancierModel()

model.fit(data.training_features, data.training_labels)

predictions = model.predict(data.testing_features)

correct = count_correct(

expected=data.testing_labels,

predicted=predictions

)

print(f'Accuracy: {100 * correct / len(predictions):,.2f}%')

1

2

3

4

5

6

The Improved Very Real Example

Page 22: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

The Improved Very Real Example

$ python improved_example.py

Accuracy: 95.66%

$ python example.py

Accuracy: 94.74%

Page 23: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Improved VictoryMachine Learning is very Easy!

Page 24: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_data()

model = FancierModel()

model.fit(data.training_features, data.training_labels)

predictions = model.predict(data.testing_features)

correct = count_correct(

expected=data.testing_labels,

predicted=predictions

)

print(f'Accuracy: {100 * correct / len(predictions):,.2f}%')

1

2

3

4

5

6

The Improved Very Real Example

Page 25: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_data()

model = EvenFancierModel()

model.fit(data.training_features, data.training_labels)

predictions = model.predict(data.testing_features)

correct = count_correct(

expected=data.testing_labels,

predicted=predictions

)

print(f'Accuracy: {100 * correct / len(predictions):,.2f}%')

1

2

3

4

5

6

The Even More Improved Very Real Example

Page 26: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

The Even More Improved Very Real Example

$ python even_more_improved_example.py

Accuracy: 97.09%

$ python improved_example.py

Accuracy: 95.66%

Page 27: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Even Bigger VictoryMachine Learning is really Easy!

Page 28: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_data()

model = EvenFancierModel()

model.fit(data.training_features, data.training_labels)

predictions = model.predict(data.testing_features)

correct = count_correct(

expected=data.testing_labels,

predicted=predictions

)

print(f'Accuracy: {100 * correct / len(predictions):,.2f}%')

1

2

3

4

5

6

The Even More Improved Very Real Example

Page 29: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_data()

model = SuperFancyModel()

model.fit(data.training_features, data.training_labels)

predictions = model.predict(data.testing_features)

correct = count_correct(

expected=data.testing_labels,

predicted=predictions

)

print(f'Accuracy: {100 * correct / len(predictions):,.2f}%')

1

2

3

4

5

6

The Super Improved Very Real Example

Page 30: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

The Super Improved Very Real Example

$ python super_improved_example.py

Accuracy: 97.11%

$ python even_more_improved_example.py

Accuracy: 97.09%

Page 31: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Super VictoryMachine Learning is super Easy!

Page 32: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

So What Now?

Page 33: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

(555) 555-1234 [email protected] https://linkedin.coim/in/mlmaster

Resume

Scott Ernst

Page 34: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

(555) 555-1234 [email protected] https://linkedin.coim/in/mlmaster

Resume

Scott Ernst

Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency.

Page 35: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

(555) 555-1234 [email protected] https://linkedin.coim/in/mlmaster

Resume

Scott Ernst

Skills

Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency.

Page 36: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

(555) 555-1234 [email protected] https://linkedin.coim/in/mlmaster

Resume

Scott Ernst

Skills

Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency.

● Model

Expert in Machine Learning with:

● FancyModel

● FancierModel

● SuperFancyModel

Page 37: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Machine Learning is a collection of tools

Page 38: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Just because you can use a hammer

doesn’t mean you can build a house.

Page 39: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Some Historical Perspective

Page 40: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

DOTCOM1995-2001

BUBBLE

Page 41: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Answer to the Ultimate Question of Life, the

Universe, and Everything...

Circa 2000

Page 42: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Web Development

Page 43: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Success & Failures

Page 44: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

One of the biggest failures at Boo was to assume that [web development] was not a technology issue. Up through launch and beyond, the [web] team was first reporting to business development and then to marketing.

Boo.com Postmortem

- Tristan Louis, CTO

Page 45: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Joel Spolsky

Co-Founder & CEO

Founder

Page 46: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

The Joel TestYes/No Questions

For Assessing the Quality of a Software Team

1. Do you use source control?

2. Can you make a build in one step?

3. Do you make daily builds?

4. Do you have a bug database?

5. Do you fix bugs before writing new code?

6. Do you have an up-to-date schedule?

7. Do you have a spec?

8. Do programmers have quiet working conditions?

9. Do you use the best tools money can buy?

10. Do you have testers?

11. Do new candidates write code during their interview?

12. Do you do hallway usability testing?

Page 47: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Answer to the Ultimate Question of Life, the

Universe, and Everything...

Circa 2019

Page 48: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Machine Learning & AI

Page 49: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

What is the “Joel Test”

for Machine Learning?

Page 50: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Keeping in mind that

Success is not the absenceof complete failure

Page 51: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

RoIReturn on Investment

Page 52: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Bad RoI

OutcomeInvest

+$100K-$200K

$0 $0.4M $0.8M $1.2M-$1.2M -$0.8M -$0.4M

Page 53: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Better RoI

OutcomeInvest

+$600K-$200K

$0 $0.4M $0.8M $1.2M-$1.2M -$0.8M -$0.4M

Page 54: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

In Machine Learning

Time is the Investment

Page 55: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Bad RoI

OutcomeInvest

+$100K

$0 $0.4M $0.8M $1.2M

-100k person hours

Page 56: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

OutcomeInvest

$0 $0.4M $0.8M $1.2M

Better RoI

+$600K

-60k person hours

Page 57: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

OutcomeInvest

$0 $0.4M $0.8M $1.2M

Much Better RoI

+$600K

-600 person hours

Page 58: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

The Holistic Process

Page 59: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Machine Learning Process (Simplified)

COLLECT

1

PROCESS

2

RESEARCH

3

DEVELOP

4

DEPLOY

5

VALIDATE

6

Page 60: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Machine Learning Process (Simplified)

COLLECT

1PROCESS

2

RESEARCH

3

DEVELOP

4

DEPLOY

5VALIDATE

6

Page 61: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Machine Learning Process (Simplified)

COLLECT

1

PROCESS

2

RESEARCH

3

DEVELOP

4

DEPLOY

5

VALIDATE

6

Page 62: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

A Lot More to it than .fit().predict()

COLLECT

1

PROCESS

2

RESEARCH

3

DEVELOP

4

DEPLOY

5

VALIDATE

6

Page 63: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

“80% of what we call analytics is not analytics at

all but just hard work”- Werner Vogels, CTO @ Amazon.com

Page 64: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Degrees of Execution Quality

Poor

OK

Good

Page 65: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

The Ideal Scenario

COLLECT

1

PROCESS

2

RESEARCH

3

DEVELOP

4

DEPLOY

5

VALIDATE

6

Quality

Page 66: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Common Case #1“The Garbage Plant”

Page 67: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

“Garbage Plant”

COLLECT

1

PROCESS

2

RESEARCH

3

DEVELOP

4

DEPLOY

5

VALIDATE

6

Poor experiments & improper data collection produce garbage results

Quality

Page 68: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Data is Incorrect

Page 69: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Some Data is Incorrect

Page 70: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_data()

model = Model()

model.fit(data.training_features, data.training_labels)

predictions = model.predict(data.testing_features)

correct = count_correct(

expected=data.testing_labels,

predicted=predictions

)

print(f'Accuracy: {100 * correct / len(predictions):,.2f}%')

1

2

3

4

5

6

The Very Real Example (again)

Page 71: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = add_noise(load_data(), amount=0.01)

model = Model()

model.fit(data.training_features, data.training_labels)

predictions = model.predict(data.testing_features)

correct = count_correct(

expected=data.testing_labels,

predicted=predictions

)

print(f'Accuracy: {100 * correct / len(predictions):,.2f}%')

1

2

3

4

5

6

The Very Real Example + Noise

Page 72: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

The Very Real Example with 1% Noise

$ python example_with_noise.py

Accuracy: 81.58%

$ python example.py

Accuracy: 94.74%

Page 73: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

@ When I Work

2.1

1400

250+

billion / month

/ second

distinct streams

volume

velocity

variety

2 second availability

Page 74: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Basic Toolchain

Ingest Store Consume

Page 75: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

How do these Tools Help Overcome...

EntropyFragmented, Inconsistent & Disparate Data

Page 76: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

BiasesThumbs on the Scale

How do these Tools Help Overcome...

Page 77: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

A Maslow’s Hierarchy of Needs

“food” “shelter” “water”

Ingest Store Consume

Page 78: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

A Maslow’s Hierarchy of Needs

Ingest Store Consume

Governance

Page 79: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Strict Governance

Data Catalog

Quarantine

Ingest

Validated Stream

Data Lake

Page 80: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Data Immutability: Write Once

Validated Stream

Data Lake

Read Only

Write Once

Page 81: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Common Case #2“The Silver Bullet”

Page 82: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Quality

“Silver Bullet”

COLLECT

1

PROCESS

2

RESEARCH

3

DEVELOP

4

DEPLOY

5

VALIDATE

6

Machine Learning will save us

Page 83: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Epsilon Modeling

ε

Page 84: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

OutcomeInvest

$0 $0.4M $0.8M $1.2M

Machine Learning RoI

+$600K

-600 person hours

Page 85: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

OutcomeInvest

$0 $0.4M $0.8M $1.2M

Machine Learning RoI

+$600K

-600 person hours

$ python version-1.py

Accuracy: 97.09%

Page 86: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

OutcomeInvest

$0 $0.4M $0.8M $1.2M

Machine Learning RoI

+$600K-200 person hours

-600 person hours

Page 87: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

OutcomeInvest

$0 $0.4M $0.8M $1.2M

Machine Learning RoI

+$600K + ???-200 person hours

-600 person hours

$ python version-2.py

Accuracy: 97.11%

Page 88: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Does the +Δ0.02% Deliver Enough Additional Value?

$ python version-2.py

Accuracy: 97.11%

$ python version-1.py

Accuracy: 97.09%

Page 89: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Netflix Envy

Page 90: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine
Page 91: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Less Successful Cases

$ python version-1.py

Accuracy: 27.4%

Page 92: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Less Successful Cases

$ python version-2.py

Accuracy: 27.7%

+

$ python version-1.py

Accuracy: 27.4%

Page 93: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Less Successful Cases

+ +

$ python version-3.py

Accuracy: 28.3%

$ python version-2.py

Accuracy: 27.7%

Page 94: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Less Successful Cases

+ + +

$ python version-4.py

Accuracy: 29.0%

$ python version-3.py

Accuracy: 28.3%

Page 95: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Future RoI: Unknown

OutcomeInvest

$0 $0.4M $0.8M $1.2M-$1.2M -$0.8M -$0.4M

?????????? ??????????

Page 96: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Non-Tech Example

Blockbuster Movies

Page 97: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Example: Rogue One

-$0.4B

-$0.8B

-$1.2B

$0

+$0.4B

+$0.8B

+$1.2B+$1.1B

-$520M

Page 98: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Example: Solo

-$0.4B

-$0.8B

-$1.2B

$0

+$0.4B

+$0.8B

+$1.2B

+$400M

-$450M

Earned

Projected

Page 99: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

E-Commerce Recommendation Engine

Page 100: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

“When you’re fundraising, it’s AI.

When you’re hiring, it’s ML.

When you’re implementing,

it’s logistic regression.”— everyone on Twitter ever

Page 101: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Common Case #3“The Academic Exercise”

Page 102: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Quality

“Academic Exercise”

COLLECT

1

PROCESS

2

RESEARCH

3DEVELOP

4

DEPLOY

5

VALIDATE

6

Subject Matter Experts reign supreme!

Page 103: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Highly Interdisciplinary Field

Machine Learning Skills

Requires expertise in a very wide range of skills

Page 104: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

First Hire

Expertise

Extreme

Low

How were they chosen?

Machine Learning Skills

Page 105: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Selection Bias

Expertise

Low

A Data Scientist is someone like me...

Machine Learning Skills

Extreme

Page 106: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

A Team Missing Skills

Expertise

Low

Important elements for success are lacking

Machine Learning Skills

Extreme

Page 107: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Built in the LaboratoryWorks in the Laboratory

Can’t Survive in the Wild

Page 108: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Local Development

stopwatch.start()result = model.fit(data)stopwatch.stop()print(stopwatch.elapsed())print(results)

Elapsed: 240 ms

******* RESULTS ******* Data: 200k rows Mean: 12.4Variance: 4.2 Error: 2.3

Page 109: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

The Dream of Transparent Scaling

stopwatch.start()result = model.fit(data)stopwatch.stop()print(stopwatch.elapsed())print(results)

Elapsed: 320 ms

******* RESULTS ******* Data: 20B rows Mean: 12.4Variance: 4.2 Error: 2.3

Page 110: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Not a Reality

stopwatch.start()result = model.fit(data)stopwatch.stop()print(stopwatch.elapsed())print(results)

Elapsed: 320 ms

******* RESULTS ******* Data: 20B rows Mean: 12.4Variance: 4.2 Error: 2.3

Page 111: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Common Case #4“Doing Agile”

Page 112: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Quality

“Doing Agile”

COLLECT

1

PROCESS

2

RESEARCH

3

DEVELOP

4

DEPLOY

5

VALIDATE

6

What looks good in our tickets is...

Page 113: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

≠Data Engineering

ApplicationEngineering

Page 114: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Applications can be Engineered“We will be able to deliver value VN in iteration N.”

Iteration 1 Iteration 2 Iteration N

Yields V1 Yields V2 Yields VN

“We will be able to add the automatic logout feature next week.”

Page 115: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Insight cannot be Engineered“We might be able to deliver insight IN in iteration N.”

Iteration 1 Iteration 2 Iteration N

Yields I1? Yields I2? Yields IN?

“We might be able to reduce false positives by 5% next week.”

Page 116: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Insight cannot be Engineered“We weren’t able to deliver insight IN in iteration N.”

Iteration 1 Iteration 2 Iteration N

Yields T1 Yields T2 Yields TN

“We weren’t able to reduce false positives by 5% last week.”

Page 117: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

shift into

Task-based Deliverables

Value-based Deliverables

Page 118: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Tasks can be Engineered“We will be able to finish task TN in iteration N.”

Iteration 1 Iteration 2 Iteration N

Yields T1 Yields T2 Yields TN

“We will be able to add a new feature to the model next week.”

Page 119: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Engineer for InsightDon’t Try to Engineer Insight

Page 120: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Engineers Shouldn’t Write ETLA Guide to Building a High Functioning Data Science Department

Jeff MagnssonVP Data Platform

https://multithreaded.stitchfix.com/blog/2016/03/16/engineers-shouldnt-write-etl/

engineers must deploy platforms, services, abstractions, and

frameworks that allow the data scientists to conceive of,

develop, and deploy their ideas ... I like to think of it in terms

of Lego blocks. Engineers design new Lego blocks that data

scientists assemble in creative ways to create new data

science.

Page 121: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Increased Operational Tempo“It’s highly likely we’ll be able to deliver insight IN in iteration N.”

Iteration 1 Iteration 2 Iteration N

Yields I1... Yields I2... Yields IN...

“We’ll likely be able to reduce false positives by 5% next week.”

Page 122: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Common Case #5“Blindly Charging Ahead”

Page 123: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

“Blindly Charging Ahead”

COLLECT

1

PROCESS

2

RESEARCH

3

DEVELOP

4

DEPLOY

5

VALIDATE

6

What effect our we even having...

Quality

Page 124: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

“All models are wrong but some are useful.”

- George Box

https://en.wikipedia.org/wiki/George_E._P._Box

Page 125: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

ML Always has an Answer

But how wrong is it?

Page 126: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Solar System Orbits

Heliocentric(Sun is the center)

Page 127: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Solar System Orbits

Geocentric(Earth is the center)

Page 128: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Solar System Orbits

Page 129: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Two “Valid” Solutions

Page 130: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_data()

model = Model()

model.fit(data.training_features, data.training_labels)

predictions = model.predict(data.testing_features)

correct = count_correct(

expected=data.testing_labels,

predicted=predictions

)

print(f'Accuracy: {100 * correct / len(predictions):,.2f}%')

1

2

3

4

5

6

The Very Real Example (Yet Again)

Page 131: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_data()

model = Model()

model.fit(data.training_features, data.training_labels)

predictions = model.predict(data.testing_features)

correct = count_correct(

expected=data.testing_labels,

predicted=predictions

)

print(f'Accuracy: {100 * correct / len(predictions):,.2f}%')

1

2

3

4

5

6

The Very Real Example (Yet Again)

Page 132: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_data()

model = Model()

model.fit(data.training_features, data.training_labels)

predictions = model.predict(data.testing_features)

correct = count_correct(

expected=data.testing_labels,

predicted=predictions

)

print(f'Accuracy: {100 * correct / len(predictions):,.2f}%')

1

2

3

4

5

6

Modify for a Rare Event Data Set

Page 133: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_rare_event_data()

model = Model()

model.fit(data.training_features, data.training_labels)

predictions = model.predict(data.testing_features)

correct = count_correct(

expected=data.testing_labels,

predicted=predictions

)

print(f'Accuracy: {100 * correct / len(predictions):,.2f}%')

1

2

3

4

5

6

Modify for a Rare Event Data Set

Page 134: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

data = load_rare_event_data()

model = AlwaysFalseModel()

model.fit(data.training_features, data.training_labels)

predictions = model.predict(data.testing_features)

correct = count_correct(

expected=data.testing_labels,

predicted=predictions

)

print(f'Accuracy: {100 * correct / len(predictions):,.2f}%')

1

2

3

4

5

6

Modify for a Rare Event Data Set

Page 135: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

$ python rare_event_example.py

Accuracy: 95.00%

The Rare Event Example

Page 136: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

$ python rare_event_example.py

Accuracy: 95.00%

The Rare Event Example

Because True only occurs 5% of the time.

Page 137: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Mocking a Heuristic as a scikit-learn Estimator

Eric NessSr Data Scientist

https://medium.com/when-i-work-data/mocking-a-heuristic-as-a-scikit-learn-estimator-9200bd2fb100

Creating mock models using a heuristic is an excellent way to

remove bottlenecks in the development cycle. [They are also

useful] in establishing the minimum performance necessary

for a model to be valuable. For example, if the model is

trying to predict which customers will leave and which will

stay, then a naive model might predict that all customers will

stay. While it has high accuracy, it’s precision will be poor.

Any viable model will need to beat the naive model’s

performance.

Page 138: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

More than a ScoreUnderstanding is Critical

Page 139: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Two “Valid” Solutions

Page 140: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Domain Expertise is CriticalFor big data to mature beyond marketing hype towards truly transformative solutions, it must “grow up” out of the computer science labs that gave birth to it and spend more time on understanding the domain-specific [problems] it is applied to than on the computing algorithms that operationalize them.

- Alev Leetaru

https://www.wired.com/2014/06/how-to-teach-heartless-computers-to-really-get-what-were-feeling/

Page 141: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

E-Commerce Recommendation Engine

Page 142: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

The Ideal Scenario

COLLECT

1

PROCESS

2

RESEARCH

3

DEVELOP

4

DEPLOY

5

VALIDATE

6

Quality

Page 143: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Self Mockery

Kevin SchirooData Engineer

https://medium.com/when-i-work-data/self-mockery-2f6eabf27b21

One of the biggest reasons that I believe we succeed in

managing all of [our many] projects is our commitment to

our practice, to not only focus on the final results we deliver,

but also on the path we take to deliver them.

Page 144: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

So what is the “Joel Test”

for Machine Learning?

Page 145: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine
Page 146: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

.fit().predict()

What I do Know

Page 147: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

Machine Learning is a powerful set of tools that require a holistic approach to use effectively.

Page 148: The Essentials of Effective Machine Learning...Experienced Machine Learning practitioner capable of solving challenging problems with creativity and efficiency. Model Expert in Machine

The Essentials of Effective Machine Learning

Scott Ernst● [email protected]● linkedin.com/in/swernst/