Slide 1

Slide 1 text

Lab to Factory

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

machine learning is our saviour

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

https://techcrunch.com/2016/11/26/machine-learning-can-fix-twitter-facebook-and-maybe-even-america/

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

machine learning is being democratised

Slide 12

Slide 12 text

machine learning

Slide 13

Slide 13 text

2006 2011 2016 "machine learning"

Slide 14

Slide 14 text

http://www.computerworld.com.au/article/601117/machine-learning-new-face-enterprise-data/

Slide 15

Slide 15 text

2006 2011 2016 "machine learning" "data science"

Slide 16

Slide 16 text

http://www.kdnuggets.com/2016/01/businesses-need-one-million-data-scientists-2018.html

Slide 17

Slide 17 text

https://hbr.org/2016/11/hiring-your-first-chief-ai-officer

Slide 18

Slide 18 text

http://www.burtchworks.com/2015/03/02/4-ways-to-spot-a-fake-data-scientist/

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

https://www.coursera.org/learn/machine-learning

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

http://www.uts.edu.au/future-students/find-a-course/courses/c04293

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

2006 2011 2016 "machine learning" "data science"

Slide 29

Slide 29 text

2006 2011 2016 "machine learning" "data science" "big data"

Slide 30

Slide 30 text

2006 2011 2016 "machine learning" "data science" "big data" "hadoop"

Slide 31

Slide 31 text

2006 2011 2016 "hadoop"

Slide 32

Slide 32 text

[do palm card version]

Slide 33

Slide 33 text

[do palm card version]

Slide 34

Slide 34 text

2006 2011 2016 2022

Slide 35

Slide 35 text

2006 2011 2016 2022

Slide 36

Slide 36 text

Slide 37

Slide 37 text

Slide 38

Slide 38 text

as a programmer the probabilities are higher than ever of working on a machine learning project

Slide 39

Slide 39 text

What do you do if you get pulled in to a project with a Machine Learning spin on it?

Slide 40

Slide 40 text

How do you approach the technology interface between science and engineering?

Slide 41

Slide 41 text

How do you approach the people interface between science and engineering?

Slide 42

Slide 42 text

What is Machine Learning?

Slide 43

Slide 43 text

“The field of machine learning is concerned with the question of how to construct computer programs that automatically improve with experience.” Tom Mitchell Machine Learning

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

mispelled Can we accurately identify mispelled words?

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

The I Just Read “The Lean Start-Up” Solution 1 def spell_check(word) 2 dictionary = Dictionary.load(file: "dictionary.yaml") 3 if dictionary.has_value?(word) 4 { correct => true } 5 else 6 { correct => false, suggestions => ["Use a dictionary ;)"] } 7 end 8 end

Slide 48

Slide 48 text

The I Just Read “TAOCP” Solution 1 int spell_check(Dictionary * dictionary, const char * word, char ** 2 suggestions) { 3 char **ngrams, distanced, suggestions; 4 int err; 5 6 err = generate_within_levenshtein_distance(word, &distanced); 7 if (err != 0) return err; 8 9 err = generate_ngrams(word, &ngrams); 10 if (err != 0) return err; 11 12 err = matching(dictionary, ngrams, distanced, &suggestions); 13 if (err != 0) return err; 14 15 return suggestions; 16 }

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

mispelled Can we accurately identify mispelled words?

Slide 52

Slide 52 text

Look at how Google does spell checking: it's not based on dictionaries; it's based on word usage statistics of the entire Internet, which is why Google knows how to correct my name, misspelled, and Microsoft Word doesn’t. Joel Spolsky Joel on Software / 2005-10-17

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

a valid context. Lots of words that are correctly spelled in a valid context. Lots of words that are correctly spelled in a valid context. Lots of words that are correctly spelled in a valid context. Lots of words that are correctly spelled in a valid context. Lots of words that are correctly spelled in a valid context. Lots of words that are correctly spelled in a valid

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

data driven code driven vs

Slide 63

Slide 63 text

Fixed Algorithm

Slide 64

Slide 64 text

General Purpose

Slide 65

Slide 65 text

Can be Simpler

Slide 66

Slide 66 text

More Experience

Slide 67

Slide 67 text

Some Problems Intractable

Slide 68

Slide 68 text

Learning Algorithm

Slide 69

Slide 69 text

Restricted Domains

Slide 70

Slide 70 text

Improve with Smarter Algorithms

Slide 71

Slide 71 text

Improve with More or Better Data

Slide 72

Slide 72 text

Can Handle Situations Infeasible for Code Driven Approaches

Slide 73

Slide 73 text

Can Be a Really Expensive Way to Encode an If Statement

Slide 74

Slide 74 text

Machine Learning Systems

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

No content

Slide 77

Slide 77 text

No content

Slide 78

Slide 78 text

? ? ? ? ?

Slide 79

Slide 79 text

480,189 users 17,770 movies 100,480,507 ratings

Slide 80

Slide 80 text

No content

Slide 81

Slide 81 text

No content

Slide 82

Slide 82 text

No content

Slide 83

Slide 83 text

https://www.kaggle.com/c/santander-product-recommendation/data

Slide 84

Slide 84 text

2016-06-28,1416856,N,ES,H, 21,2015-07-25,0, 11, 1,,1.0,A,S,N,,KHQ,N,1, 6,"BADAJOZ",1, 38937.48,03 - UNIVERSITARIO 2016-06-28,1202981,N,ES,H, 23,2013-10-18,0, 32, 1,,1.0,I,S,N,,KHE,N,1,29,"MALAGA",0, 56409.06,03 - UNIVERSITARIO 2016-06-28, 137134,N,ES,V, 51,1999-06-30,0, 204, 1,,1.0,A,S,S,,KAT,N,1,28,"MADRID",1, 443237.88,02 - PARTICULARES 2016-06-28,1256662,N,ES,V, 32,2014-05-06,0, 25, 1,,1.0,A,S,N,,KFC,N,1, 2,"ALBACETE",1, 69776.79,03 - UNIVERSITARIO 2016-06-28, 833024,N,ES,V, 36,2009-02-08,0, 88, 1,,1.0,I,S,N,,KFC,N,1,24,"LEON",0, 80136.27,02 - PARTICULARES 2016-06-28, 198396,N,ES,V, 44,2000-10-13,0, 188, 1,,1.0,A,S,N,,KFC,N,1,28,"MADRID",1, 451931.22,02 - PARTICULARES 2016-06-28,1055228,N,ES,H, 43,2012-08-31,0, 45, 1,,1,A,S,N,,KFC,N,1,11,"CADIZ",1, 57271.83,02 - PARTICULARES 2016-06-28,1453594,N,ES,H, 21,2015-09-17,0, 9, 1,,1.0,I,S,N,,KHQ,N,1,15,"CORUÑA, A",0, NA,03 - UNIVERSITARIO 2016-06-28,1114959,N,ES,V, 48,2012-12-28,0, 42, 1,,1,A,S,N,,KFC,N,1, 6,"BADAJOZ",1, 164920.32,02 - PARTICULARES 2016-06-28, 193664,N,ES,H, 90,2000-10-09,0, 189, 1,,1.0,I,S,N,,KAT,N,1,50,"ZARAGOZA",0, 63982.68,02 - PARTICULARES 2016-06-28,1461846,N,ES,H, 22,2015-09-25,0, 9, 1,,1,I,S,N,,KHQ,N,1, 6,"BADAJOZ",0, NA,03 - UNIVERSITARIO 2016-06-28, 281786,N,ES,V, 84,2001-10-13,0, 176, 1,,1,I,S,N,,KAT,N,1,41,"SEVILLA",0, 204135.63,02 - PARTICULARES 2016-06-28, 931057,N,ES,V, 25,2011-08-09,0, 58, 1,,1.0,I,S,N,,KHE,N,1, 8,"BARCELONA",0, 71185.62,03 - UNIVERSITARIO 2016-06-28, 380119,N,ES,H, 66,2002-09-02,0, 166, 1,,1.0,A,S,N,,KFC,N,1,46,"VALENCIA",1, 34973.19,02 - PARTICULARES 2016-06-28, 509236,N,ES,V, 39,2004-12-30,0, 138, 1,,1,A,S,N,,KFC,N,1,41,"SEVILLA",1, 86109.66,02 - PARTICULARES 2016-06-28, 755342,N,ES,V, 51,2008-03-24,0, 99, 1,,1.0,A,S,N,,KAT,N,1, 8,"BARCELONA",1, 29992.74,02 - PARTICULARES 2016-06-28, 678258,N,ES,H, 38,2007-02-20,0, 112, 1,,1.0,I,S,N,,KAT,N,1,28,"MADRID",0, 133180.17,02 - PARTICULARES 2016-06-28, 103307,N,ES,V, 44,1998-08-04,0, 215, 1,,1.0,I,S,S,,KAT,N,1,28,"MADRID",1, 76519.59,02 - PARTICULARES 2016-06-28,1308331,N,ES,H, 22,2014-09-16,0, 21, 1,,1,I,S,N,,KHE,N,1,36,"PONTEVEDRA",0, 134962.29,03 - UNIVERSITARIO 2016-06-28,1006357,N,ES,V, 32,2012-02-27,0, 52, 1,,1,A,S,N,,KFA,N,1,28,"MADRID",1, 65619.90,03 - UNIVERSITARIO 2016-06-28, 124854,N,ES,V, 45,1999-03-10,0, 207, 1,,1,I,S,N,,KAT,N,1, 8,"BARCELONA",0, NA,02 - PARTICULARES 2016-06-28, 757178,N,ES,V, 59,2008-03-31,0, 99, 1,,1.0,A,S,N,,KFC,N,1,28,"MADRID",1, 109184.13,02 - PARTICULARES 2016-06-28, 759426,N,ES,H, 68,2008-04-09,0, 98, 1,,1,I,S,N,,KFA,N,1,28,"MADRID",0, 210710.49,02 - PARTICULARES 2016-06-28,1193227,N,ES,H, 33,2013-10-09,0, 32, 1,,1.0,I,S,N,,KHE,N,1,50,"ZARAGOZA",0, 42343.29,03 - UNIVERSITARIO 2016-06-28,1192797,N,ES,V, 25,2013-10-09,0, 32, 1,,1,I,S,N,,KHE,N,1,33,"ASTURIAS",0, 176043.90,03 - UNIVERSITARIO 2016-06-28,1085653,N,ES,V, 33,2012-10-22,0, 44, 1,,1.0,I,S,N,,KHE,N,1, 8,"BARCELONA",0, 128796.93,03 - UNIVERSITARIO 2016-06-28,1486100,N,ES,H, 22,2015-10-21,0, 8, 1,,1.0,I,S,N,,KHQ,N,1,28,"MADRID",0, NA,03 - UNIVERSITARIO 2016-06-28, 31025,N,ES,V, 61,1996-01-12,0, 245, 1,,1.0,A,S,N,,KAT,N,1,28,"MADRID",1, 140976.18,01 - TOP 2016-06-28,1471619,N,ES,H, 22,2015-10-07,0, 8, 1,,1.0,I,S,N,,KHQ,N,1,19,"GUADALAJARA",0, NA,03 - UNIVERSITARIO

Slide 85

Slide 85 text

fecha_dato The table is partitioned for this column ncodpers Customer code ind_empleado Employee index: A active, B ex employed, F filial, N not employee, P pasive pais_residencia Customer's Country residence sexo Customer's sex age Age fecha_alta The date in which the customer became as the first holder of a contract in the bank ind_nuevo New customer Index. 1 if the customer registered in the last 6 months. antiguedad Customer seniority (in months) indrel 1 (First/Primary), 99 (Primary customer during the month but not at the end of the month) ult_fec_cli_1t Last date as primary customer (if he isn't at the end of the month) indrel_1mes Customer type at the beginning of the month ,1 (First/Primary customer), 2 (co-owner ),P (Potential),3 (former primary), 4(former co-owner) tiprel_1mes Customer relation type at the beginning of the month, A (active), I (inactive), P (former customer),R (Potential) indresi Residence index (S (Yes) or N (No) if the residence country is the same than the bank country) indext Foreigner index (S (Yes) or N (No) if the customer's birth country is different than the bank country) conyuemp Spouse index. 1 if the customer is spouse of an employee canal_entrada channel used by the customer to join indfall Deceased index. N/S tipodom Addres type. 1, primary address cod_prov Province code (customer's address) nomprov Province name ind_actividad_cliente Activity index (1, active customer; 0, inactive customer)

Slide 86

Slide 86 text

Something showing the reality of where all of these features would have needed to be pulled from

Slide 87

Slide 87 text

Something showing what would be required to “execute” on predictions - i.e. plumbing in to decisioning systems, etc

Slide 88

Slide 88 text

No content

Slide 89

Slide 89 text

No content

Slide 90

Slide 90 text

“We evaluated some of the new methods offline but the additional accuracy gains that we measured did not seem to justify the engineering effort needed to bring them into a production environment.” Xavier Amatriain and Justin Basilico Personalisation Science and Engineering at Netflix

Slide 91

Slide 91 text

Something showing what the Netflix architecture looks like

Slide 92

Slide 92 text

No content

Slide 93

Slide 93 text

No content

Slide 94

Slide 94 text

No content

Slide 95

Slide 95 text

Ambiata - multiple verticals - different data - getting multiple ML systems to production

Slide 96

Slide 96 text

Receive data every day Batch score models every day Prepare features every day x N

Slide 97

Slide 97 text

- good results - 1. more/better data - 2. better algorithms -> it's a business decision as to which one to focus on -> which has the higher ROI

Slide 98

Slide 98 text

Production

Slide 99

Slide 99 text

“A wide-spread and uncomfortable trend has emerged: developing and deploying ML systems is relatively fast and cheap, but maintaining them over time is difficult and expensive.” D. Sculley, Gary Holt, Daniel Golovin, Eugene Davydov, Todd Phillips, Dietmar Ebner, Vinay Chaudhary, Michael Young, Jean-Francois Crespo, Dan Dennison Hidden Technical Debt in Machine Learning Systems

Slide 100

Slide 100 text

No content

Slide 101

Slide 101 text

Data Acquisition

Slide 102

Slide 102 text

No content

Slide 103

Slide 103 text

No content

Slide 104

Slide 104 text

No content

Slide 105

Slide 105 text

No content

Slide 106

Slide 106 text

No content

Slide 107

Slide 107 text

No content

Slide 108

Slide 108 text

data acquisition is non-trivial

Slide 109

Slide 109 text

the data will be messy

Slide 110

Slide 110 text

format zoo

Slide 111

Slide 111 text

most important property of a robust data architecture is have hard edges

Slide 112

Slide 112 text

“Traditional abstractions and boundaries may be subtly corrupted or invalidated by the fact that data influences ML system behavior” D. Sculley, Gary Holt, Daniel Golovin, Eugene Davydov, Todd Phillips, Dietmar Ebner, Vinay Chaudhary, Michael Young, Jean-Francois Crespo, Dan Dennison Hidden Technical Debt in Machine Learning Systems

Slide 113

Slide 113 text

“… Indeed, ML is required in exactly those cases when the desired behavior cannot be effectively expressed in software logic without dependency on external data. The real world does not fit into tidy encapsulation.” D. Sculley, Gary Holt, Daniel Golovin, Eugene Davydov, Todd Phillips, Dietmar Ebner, Vinay Chaudhary, Michael Young, Jean-Francois Crespo, Dan Dennison Hidden Technical Debt in Machine Learning Systems

Slide 114

Slide 114 text

format zoo data-platform

Slide 115

Slide 115 text

format zoo data-platform “the” format

Slide 116

Slide 116 text

format zoo data-platform optimise for data-size

Slide 117

Slide 117 text

format zoo data-platform optimise for i/o performance

Slide 118

Slide 118 text

format zoo data-platform optimise for tooling

Slide 119

Slide 119 text

format zoo data-platform security / privacy?

Slide 120

Slide 120 text

Data Verification

Slide 121

Slide 121 text

No content

Slide 122

Slide 122 text

“The field of machine learning is concerned with the question of how to construct computer programs that automatically improve with experience.” Tom Mitchell Machine Learning

Slide 123

Slide 123 text

the margin of benefit on machine learning systems is often very low

Slide 124

Slide 124 text

poor quality data can negate any benefit a good model may give you

Slide 125

Slide 125 text

statistics are good at identifying issues in data

Slide 126

Slide 126 text

statisticians are good at using statistics to identify issues in data

Slide 127

Slide 127 text

the lab is an optimal environment for this

Slide 128

Slide 128 text

we can use all the data or statistically equivalent samples

Slide 129

Slide 129 text

No content

Slide 130

Slide 130 text

time is just trying to mess with us

Slide 131

Slide 131 text

data will change over time

Slide 132

Slide 132 text

data changes must be handled as you go

Slide 133

Slide 133 text

data issues must be fixed as you go

Slide 134

Slide 134 text

timeliness of data becomes a quality issue

Slide 135

Slide 135 text

no escape hatch, you can’t start again

Slide 136

Slide 136 text

No content

Slide 137

Slide 137 text

No content

Slide 138

Slide 138 text

static checks are important

Slide 139

Slide 139 text

absolute thresholds are meh

Slide 140

Slide 140 text

proportional thresholds are ok

Slide 141

Slide 141 text

statistical properties are good

Slide 142

Slide 142 text

anomalies

Slide 143

Slide 143 text

No content

Slide 144

Slide 144 text

No content

Slide 145

Slide 145 text

anomaly

Slide 146

Slide 146 text

need to account for seasonal and growth trends

Slide 147

Slide 147 text

breakouts

Slide 148

Slide 148 text

No content

Slide 149

Slide 149 text

No content

Slide 150

Slide 150 text

breakout

Slide 151

Slide 151 text

need to account for seasonal and growth trends

Slide 152

Slide 152 text

proportional thresholds are ok

Slide 153

Slide 153 text

No content

Slide 154

Slide 154 text

Feature Engineering

Slide 155

Slide 155 text

“At the end of the day, some machine learning projects succeed and some fail. What makes the difference? Easily the most important factor is the features used.” Pedro Domingos A Few Useful Things to Know about Machine Learning

Slide 156

Slide 156 text

No content

Slide 157

Slide 157 text

No content

Slide 158

Slide 158 text

No content

Slide 159

Slide 159 text

our systems should be linear in data volume not feature count

Slide 160

Slide 160 text

we want to be able to throw new features into the mix

Slide 161

Slide 161 text

No content

Slide 162

Slide 162 text

we can’t afford to reprocess historical data

Slide 163

Slide 163 text

Model Training

Slide 164

Slide 164 text

No content

Slide 165

Slide 165 text

repeatability

Slide 166

Slide 166 text

repeatability

Slide 167

Slide 167 text

repeatability

Slide 168

Slide 168 text

can we retrain models on demand?

Slide 169

Slide 169 text

can we reproduce results independently?

Slide 170

Slide 170 text

Model Scoring

Slide 171

Slide 171 text

No content

Slide 172

Slide 172 text

No content

Slide 173

Slide 173 text

Model Deployment

Slide 174

Slide 174 text

No content

Slide 175

Slide 175 text

No content

Slide 176

Slide 176 text

No content

Slide 177

Slide 177 text

Monitoring

Slide 178

Slide 178 text

No content

Slide 179

Slide 179 text

alert fatigue is real

Slide 180

Slide 180 text

actionability of alarms needs to be supported by your architecture

Slide 181

Slide 181 text

time to verify failures is high

Slide 182

Slide 182 text

time to recover failures is high

Slide 183

Slide 183 text

cost to recover failures is high

Slide 184

Slide 184 text

cost of false negative is high

Slide 185

Slide 185 text

cost of false positive is high

Slide 186

Slide 186 text

Results Delivery

Slide 187

Slide 187 text

No content

Slide 188

Slide 188 text

No content

Slide 189

Slide 189 text

Change Management

Slide 190

Slide 190 text

we want to be able to do this again

Slide 191

Slide 191 text

more models

Slide 192

Slide 192 text

better models

Slide 193

Slide 193 text

and we don’t want to make a mistake

Slide 194

Slide 194 text

No content

Slide 195

Slide 195 text

Delivery

Slide 196

Slide 196 text

delivery anti patterns

Slide 197

Slide 197 text

anti-pattern: programmers using open source ML software

Slide 198

Slide 198 text

anti-pattern: data scientists scheduling R scripts

Slide 199

Slide 199 text

No content

Slide 200

Slide 200 text

not just programmers

Slide 201

Slide 201 text

not just machine learners

Slide 202

Slide 202 text

anti-pattern: we can’t say upfront how long it will take to build a good model

Slide 203

Slide 203 text

No content

Slide 204

Slide 204 text

time boxing

Slide 205

Slide 205 text

incremental development

Slide 206

Slide 206 text

regular reviews

Slide 207

Slide 207 text

Lab Factory investigate opportunities system build system operate analyse performance

Slide 208

Slide 208 text

anti-pattern: our model performs really well

Slide 209

Slide 209 text

No content

Slide 210

Slide 210 text

know what success is and know how to measure it

Slide 211

Slide 211 text

more revenue / profit

Slide 212

Slide 212 text

more clicks

Slide 213

Slide 213 text

more customers

Slide 214

Slide 214 text

less time between actions

Slide 215

Slide 215 text

No content

Slide 216

Slide 216 text

run experiments

Slide 217

Slide 217 text

know if impacts are due to you

Slide 218

Slide 218 text

anti-pattern: google did it

Slide 219

Slide 219 text

No content

Slide 220

Slide 220 text

latest algorithms aren’t always the answer

Slide 221

Slide 221 text

more/better data isn’t always the answer

Slide 222

Slide 222 text

an informed ROI discussion is the answer

Slide 223

Slide 223 text

“CIOs are in trouble right now… We’ve seen exponential growth in data. If I drop data on the floor and lose it, I am a bad CIO but if my budget grows exponentially to handle it, I am also a bad CIO.” Stephen Probst CTO at Teradata

Slide 224

Slide 224 text

No content

Slide 225

Slide 225 text

Lab to Factory