Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Big Data, Predictive Modeling and tools

Big Data, Predictive Modeling and tools

CCIP 2015

Olivier Grisel

October 08, 2015
Tweet

More Decks by Olivier Grisel

Other Decks in Technology

Transcript

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

    View Slide

  2. About me

    View Slide

  3. Big Data as a
    buzzword

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  10. Big Data

    Predictive Analytics

    View Slide

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

    View Slide

  12. How big is Big Data?

    View Slide

  13. 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

    View Slide

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

    View Slide

  15. 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

    View Slide

  16. View Slide

  17. View Slide

  18. 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

    View Slide

  19. What is Predictive
    Analytics?
    and Machine Learning

    View Slide

  20. 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

    View Slide

  21. 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 ?

    View Slide

  22. 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

    View Slide

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

    View Slide

  24. 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

    View Slide

  25. 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

    View Slide

  26. Tools for predictive
    analytics

    View Slide

  27. SPSS
    MATLAB

    View Slide

  28. SPSS
    MATLAB

    View Slide

  29. 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

    View Slide

  30. 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

    View Slide

  31. 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

    View Slide

  32. 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

    View Slide

  33. View Slide

  34. View Slide

  35. 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

    View Slide

  36. 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

    View Slide

  37. 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

    View Slide

  38. 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

    View Slide

  39. Big Data architecture(s)
    & tools

    View Slide

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

    View Slide

  41. View Slide

  42. View Slide

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

    View Slide

  44. Bonus tracks

    View Slide

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

    View Slide

  46. 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

    View Slide

  47. Predictive Analytics on
    Big Data

    View Slide

  48. View Slide

  49. BIG DATA

    View Slide

  50. BIG DATA small(er) data

    View Slide

  51. BIG DATA small(er) data

    View Slide

  52. 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

    View Slide

  53. Data size and
    modeling quality

    View Slide

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

    View Slide

  55. View Slide

  56. View Slide

  57. View Slide

  58. More data beats
    better models?

    View Slide

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

    View Slide

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

    View Slide

  61. View Slide

  62. model stops improving

    View Slide

  63. View Slide

  64. Bias vs Variance

    View Slide

  65. high bias

    View Slide

  66. high bias
    high variance

    View Slide

  67. high bias
    high variance
    low variance

    View Slide

  68. Variance solution #1:
    collect more samples

    View Slide

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

    View Slide

  70. View Slide

  71. high variance
    almost no bias
    variance
    decreasing
    with #samples

    View Slide

  72. Bias solution #1:
    non-parametric models

    View Slide

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

    View Slide

  74. 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

    View Slide

  75. Data has 2 dimensions:
    # samples and # features

    View Slide

  76. Bias solution #2:
    richer features

    View Slide

  77. View Slide

  78. • 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

    View Slide

  79. • 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

    View Slide