Slide 1

Slide 1 text

Big Data, Predictive Modeling & Tools Olivier Grisel — @ogrisel CCIP October 2015

Slide 2

Slide 2 text

About me

Slide 3

Slide 3 text

Big Data as a buzzword

Slide 4

Slide 4 text

Regionator 3000 http://labs.data-publica.com/regionator3000/

Slide 5

Slide 5 text

http://transports.blog.lemonde.fr/2014/06/05/regionator-la- carte-de-france-dessinee-par-les-trajets-quotidiens/

Slide 6

Slide 6 text

http://transports.blog.lemonde.fr/2014/06/05/regionator-la- carte-de-france-dessinee-par-les-trajets-quotidiens/

Slide 7

Slide 7 text

http://www.insee.fr/fr/themes/detail.asp? reg_id=99&ref_id=mobilite-professionnelle-10

Slide 8

Slide 8 text

http://www.insee.fr/fr/themes/detail.asp? reg_id=99&ref_id=mobilite-professionnelle-10

Slide 9

Slide 9 text

120% of the capacity of a 3’5 floppy disk

Slide 10

Slide 10 text

Big Data ≠ Predictive Analytics

Slide 11

Slide 11 text

Outline • What Big Data actually is or isn’t • Predictive modeling concepts & tools • Big Data architecture & tools

Slide 12

Slide 12 text

How big is Big Data?

Slide 13

Slide 13 text

Not Big Data • Data that fits on a spreadsheet • Data that can be analyzed in RAM (< 10 GB) • Data operations that can be performed quickly by a traditional database, e.g. single node PostgreSQL server

Slide 14

Slide 14 text

Reading the full content of a 1TB HDD at 100MB/s: 2 hours 45 minutes

Slide 15

Slide 15 text

Canonical Big Data problem: indexing the Web • For each word, aggregate the list of page URLs • 2 billion HTML pages: 100TB >10 days just to read sequentially

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

Other Big Data examples • GSM location event log from telco • Transaction log of a big retail network • Activity records for a service with 10s of millions of users

Slide 19

Slide 19 text

What is Predictive Analytics? and Machine Learning

Slide 20

Slide 20 text

Type # rooms Surface m2 Floor Public Transports Apartment 3 65 2 Yes House 5 110 NA No Duplex 4 95 4 Yes features samples Sold 300k 1.5M 2.2M target

Slide 21

Slide 21 text

Type # rooms Surface m2 Floor Public Transports Apartment 3 65 2 Yes House 5 110 NA No Duplex 4 95 4 Yes features samples Sold 300k 1.5M 2.2M target Apartment 2 35 3 Yes ?

Slide 22

Slide 22 text

Predictive Modeling • Automated predictions of outcome on new data • Alternative to hard-coded rules written by experts • Extract the structure of historical data • Statistical tools to summarize the training data into an executable predictive model

Slide 23

Slide 23 text

Training text docs images sounds transactions Labels Machine Learning Algorithm Model Predictive Modeling Data Flow Feature vectors

Slide 24

Slide 24 text

New text doc image sound transaction Model Expected Label Predictive Modeling Data Flow Feature vector Training text docs images sounds transactions Labels Machine Learning Algorithm Feature vectors

Slide 25

Slide 25 text

Predictive Models • Ex: Movie recommendations or targeted ads • Embedded in a user service to make it more useful / attractive / profitable • A wrong individual decision is not costly • Large number of small automated decisions • Humans would not be fast enough to make the predictions

Slide 26

Slide 26 text

Tools for predictive analytics

Slide 27

Slide 27 text

SPSS MATLAB

Slide 28

Slide 28 text

SPSS MATLAB

Slide 29

Slide 29 text

New text doc image sound transaction Model Expected Label Small data Training text docs images sounds transactions Labels Machine Learning Algorithm Feature vectors Feature vector

Slide 30

Slide 30 text

New text doc image sound transaction Model Expected Label Small / Medium data Training text docs images sounds transactions Labels Machine Learning Algorithm Feature vectors Feature vector

Slide 31

Slide 31 text

New text doc image sound transaction Model Expected Label Small / Medium data with Training text docs images sounds transactions Labels Machine Learning Algorithm Feature vectors Feature vector

Slide 32

Slide 32 text

New text doc image sound transaction Model Expected Label Small / Medium data with Training text docs images sounds transactions Labels Machine Learning Algorithm Feature vectors Feature vector

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

Model Expected Label Big data with Machine Learning Algorithm New text doc image sound transaction Training text docs images sounds transactions Labels Feature vectors Feature vector

Slide 36

Slide 36 text

Model Expected Label Big data with Machine Learning Algorithm New text doc image sound transaction Training text docs images sounds transactions Labels Feature vectors Feature vector

Slide 37

Slide 37 text

Model Expected Label Big data with Machine Learning Algorithm New text doc image sound transaction Training text docs images sounds transactions Labels Feature vectors Feature vector

Slide 38

Slide 38 text

Model Expected Label Big data with Machine Learning Algorithm New text doc image sound transaction Training text docs images sounds transactions Labels Feature vectors Feature vector

Slide 39

Slide 39 text

Big Data architecture(s) & tools

Slide 40

Slide 40 text

Distributed Event Log & Queues Distributed Event Stream Processing Distributed Storage Distributed Batch Processing On-line Transaction Processing & App Views Analytical Database Predictive Models

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

Thank you! Questions? @Inria @ogrisel http://scikit-learn.org

Slide 44

Slide 44 text

Bonus tracks

Slide 45

Slide 45 text

Back to the Regionator What if we did not have census data on daily mobility?

Slide 46

Slide 46 text

Back to the Regionator • Use raw daily telco logs • Group By (phone, day) to extract daily trips • Join By GPS coordinates to “departement” names • Filter out small trips • Group By (home, work) “departements” • Count

Slide 47

Slide 47 text

Predictive Analytics on Big Data

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

BIG DATA

Slide 50

Slide 50 text

BIG DATA small(er) data

Slide 51

Slide 51 text

BIG DATA small(er) data

Slide 52

Slide 52 text

From Big to Small • Feature extraction often shrinks data • Filter / Join / Group By / Count • Machine Learning performed on aggregates • Sampling for fast in-memory iterative modeling

Slide 53

Slide 53 text

Data size and modeling quality

Slide 54

Slide 54 text

– Peter Norvig, Research Director, Google “We don’t have better algorithms. We just have more data.”

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

More data beats better models?

Slide 59

Slide 59 text

http://technocalifornia.blogspot.fr/2012/07/more-data-or-better- models.html

Slide 60

Slide 60 text

Let’s train a parametric model to read handwritten digits from gray level pixels.

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

model stops improving

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

Bias vs Variance

Slide 65

Slide 65 text

high bias

Slide 66

Slide 66 text

high bias high variance

Slide 67

Slide 67 text

high bias high variance low variance

Slide 68

Slide 68 text

Variance solution #1: collect more samples

Slide 69

Slide 69 text

Let’s train a non-parametric model to read handwritten digits from gray level pixels.

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

high variance almost no bias variance decreasing with #samples

Slide 72

Slide 72 text

Bias solution #1: non-parametric models

Slide 73

Slide 73 text

Type # rooms Surface (m2) Floor Public Transp. Apart. 3 65 2 Yes House 5 110 NA No Duplex 4 95 4 Yes features samples

Slide 74

Slide 74 text

Type # rooms Surface (m2) Floor Public Transp. School (km) Flood plain Apart. 3 65 2 Yes 1.0 No House 5 110 NA No 25.0 Yes Duplex 4 95 4 Yes 0.5 No features samples

Slide 75

Slide 75 text

Data has 2 dimensions: # samples and # features

Slide 76

Slide 76 text

Bias solution #2: richer features

Slide 77

Slide 77 text

No content

Slide 78

Slide 78 text

• Parametric e.g. linear model (traditional stats) vs Non-parametric e.g. Random Forests, Neural Networks (Machine Learning) • Understand a model with 10% accuracy vs blindly trust a model with 90% accuracy • Simple models e.g. F = m a, F = - G (m1 + m2) / r^2 will not become false(r) because of big data • New problems can be tackled: computer vision, speech recognition, natural language understanding

Slide 79

Slide 79 text

• the (experimental) scientific method introduced by Karl Popper is based on the falsifiability of formulated hypotheses • theory is correct as long as past predictions hold in new experiments • machine learning train-validation-test splits and cross-validation is similar in spirit • ml model is just a complex theory: correct as long as its predictions still hold