A business-level introduction to
Artificial Intelligence
@louisdorard
#PAPIsConnect - March 14, 2016
AI is everywhere
Lars Trieloff
@trieloff
(see source)
How does it work?
Data + Machine Learning
Bedrooms Bathrooms Surface (foot²) Year built Type Price ($)
3 1 860 1950 house 565,000
3 1 1012 1951 house
2 1.5 968 1976 townhouse 447,000
4 1315 1950 house 648,000
3 2 1599 1964 house
3 2 987 1951 townhouse 790,000
1 1 530 2007 condo 122,000
4 2 1574 1964 house 835,000
4 2001 house 855,000
3 2.5 1472 2005 house
4 3.5 1714 2005 townhouse
2 2 1113 1999 condo
1 769 1999 condo 315,000
Bedrooms Bathrooms Surface (foot²) Year built Type Price ($)
3 1 860 1950 house 565,000
3 1 1012 1951 house
2 1.5 968 1976 townhouse 447,000
4 1315 1950 house 648,000
3 2 1599 1964 house
3 2 987 1951 townhouse 790,000
1 1 530 2007 condo 122,000
4 2 1574 1964 house 835,000
4 2001 house 855,000
3 2.5 1472 2005 house
4 3.5 1714 2005 townhouse
2 2 1113 1999 condo
1 769 1999 condo 315,000
Bedrooms Bathrooms Surface (foot²) Year built Type Price ($)
3 1 860 1950 house 565,000
3 1 1012 1951 house
2 1.5 968 1976 townhouse 447,000
4 1315 1950 house 648,000
3 2 1599 1964 house
3 2 987 1951 townhouse 790,000
1 1 530 2007 condo 122,000
4 2 1574 1964 house 835,000
4 2001 house 855,000
3 2.5 1472 2005 house
4 3.5 1714 2005 townhouse
2 2 1113 1999 condo
1 769 1999 condo 315,000
ML is a set of AI techniques where
“intelligence” is built from
examples
20
Everyday use cases
• Real-estate
• Spam
• Priority inbox
• Crowd prediction
property price
email spam indicator
email importance indicator
location & context #people
Zillow
Gmail
Gmail
Tranquilien
Business use cases
I. Get more customers
II. Serve customers better
III. Serve customers more efficiently
I. Get more customers
• Reduce churn
• Score leads
customer churn indicator
customer revenue
II. Serve customers better
• Provide the right products
• Optimize pricing
• Use predictive enterprise apps…
customer & product purchase indicator
product & price #sales
III. Serve customers more efficiently
• Predict demand
• Automate tasks
• Use predictive enterprise apps…
context demand
credit application repayment indicator
Predictive enterprise apps
• Social media filtering
• Message routing
tweet actionability indicator
request employee
RULES
–Katherine Barr, Partner at VC-firm MDV
"Pairing human workers with
machine learning and automation
will transform knowledge work
and unleash new levels of human
productivity and creativity."
Decisions from predictions
1. Descriptive
2. Predictive
3. Prescriptive

29
Types of analytics
1. Show churn rate against time
2. Predict which customers will churn next
3. Decide what to do about each customer

(e.g. propose to switch plan, send promotional offer, etc.)
30
Churn analysis
“Decide what to do about each customer”→ prioritised list of actions,
based on…
• Customer representation + context
• Churn prediction & action prediction
• Uncertainty in predictions
• Revenue brought by customer & Cost of actions
• Constraints on frequency of solicitations
31
Churn analysis
1. Show past demand against calendar
2. Predict demand for [product] at [store] in next 2 days
3. Decide how much to ship
• Trade-off: cost of storage vs risk of lost sales
• Constraints on order size, truck volume, capacity of people
putting stuff into shelves
32
Replenishment
33
Pricing optimisation
From David Jones (@d_jones, see source)
3. Decide price given product and context…
• For several price candidates (within constrained range):
• Predict # sales given product, context, price
• Multiply by price to estimate revenue
34
Pricing optimisation
3. Decide price given product and context…
• For several price candidates (within constrained range):
• Predict 95%-confidence lower bound on # sales given
product, context, price
• Multiply by price to estimate revenue
35
Pricing optimisation
• Context
• Predictions
• Uncertainty in predictions
• Constraints
• Costs / benefits
• Competing objectives
• Business rules
36
Decisions are based on…
1. Descriptive analytics
2. Predictive analytics
3. Prescriptive analytics
4. Automated decisions
37
Beyond prescriptive analytics…
• Spam filter → decide to skip inbox
• Autonomous Vehicles → decide who to kill
38
Autonomous decision-making systems
“Tool AI”vs“High-stakes autonomous AI”
APIs are key
Software components for automated decisions:
• Create training dataset from historical data (merge sources, aggregate…)
• Provide predictive model from given training set (i.e. learn)
• Provide prediction against model for given context
• Provide optimal decision from given contextual data, predictions,
uncertainties, constraints, objectives, costs
• Apply given decision
40
Separation of concerns
Software components for automated decisions:
• Create training dataset from historical data (merge sources, aggregate…)
• Provide predictive model from given training set (i.e. learn)
• Provide prediction against model for given context
• Provide optimal decision from given contextual data, predictions,
uncertainties, constraints, objectives, costs
• Apply given decision
41
Application-specific component
Software components for automated decisions:
• Create training dataset from historical data (merge sources, aggregate…)
• Provide predictive model from given training set (i.e. learn)
• Provide prediction against model for given context
• Provide optimal decision from given contextual data, predictions,
uncertainties, constraints, objectives, costs
• Apply given decision
42
Optimization / Operations Research component
Software components for automated decisions:
• Create training dataset from historical data (merge sources, aggregate…)
• Provide predictive model from given training set (i.e. learn)
• Provide prediction against model for given context
• Provide optimal decision from given contextual data, predictions,
uncertainties, constraints, objectives, costs
• Apply given decision
43
Machine Learning components
Software components for automated decisions:
• Create training dataset from historical data (merge sources, aggregate…)
• Provide predictive model from given training set (i.e. learn)
• Provide prediction against model for given context
• Provide optimal decision from given contextual data, predictions,
uncertainties, constraints, objectives, costs
• Apply given decision
44
Predictive APIs
45
Predictive APIs
The two phases of machine learning:
• TRAIN a model
• PREDICT with a model
46
Predictive APIs
The two methods of predictive APIs:
• TRAIN a model
• PREDICT with a model
47
Predictive APIs
The two methods of predictive APIs:
• model = create_model(‘training.csv’)
• predicted_output, confidence =
create_prediction(model, new_input)
48
Predictive APIs
Cloud:
• Amazon ML
• BigML
• Google Prediction
• PredicSis
49
Providers of REST http Predictive APIs
Open source:
• Seldon
• PredictionIO
Limitations of ML
1. Need examples of inputs AND outputs
2. What if not enough data points?
3. What if similar inputs but dissimilar outputs?
Bedrooms Bathrooms Price ($)
3 2 500,000
3 2 800,000
1 1 300,000
1 1 800,000
Bedrooms Bathrooms Surface (foot²) Year built Price ($)
3 2 800 1950 500,000
3 2 1000 1950 800,000
1 1 500 1950 300,000
1 1 500 2014 800,000
“Garbage In, Garbage Out”
“A model can only be as good as
the data it was given to train on”
Machine Learning Canvas
Make sure that…
• All efforts are directed at solving the right problem for your
company
• You’re using the right algorithm, infrastructure, or ML solution
for that problem
• Team members understand each other (developers, data
scientists, product managers, business executives)
64
Before you start implementing
65
The Canvas Concept
PREDICTIONS OBJECTIVES DATA
Context
Who will use the predictive system / who will be
affected by it? Provide some background.
Value Proposition
What are we trying to do? E.g. spend less time on
X, increase Y...
Data Sources
Where do/can we get data from? (internal
database, 3rd party API, etc.)
Problem
Question to predict answers to (in plain English)
Input (i.e. question "parameter")
Possible outputs (i.e. "answers")
Type of problem (e.g. classification, regression,
recommendation...)
Baseline
What is an alternative way of making predictions
(e.g. manual rules based on feature values)?
Performance evaluation
Domain-specific / bottom-line metrics for
monitoring performance in production
Prediction accuracy metrics (e.g. MSE if
regression; % accuracy, #FP for classification)
Offline performance evaluation method (e.g.
cross-validation or simple training/test split)
Dataset
How do we collect data (inputs and outputs)?
How many data points?
Features
Used to represent inputs and extracted from
data sources above. Group by types and
mention key features if too many to list all.
Using predictions
When do we make predictions and how many?
What is the time constraint for making those predictions?
How do we use predictions and confidence values?
Learning predictive models
When do we create/update models? With which data / how much?
What is the time constraint for creating a model?
Criteria for deploying model (e.g. minimum performance value — absolute,
relative to baseline or to previous model)
IDEASPECSDEPLOYMENT
BACKGROUND
ENGINE SPECS
INTEGRATION
PREDICTIONS OBJECTIVES DATA
BACKGROUND
ENGINE SPECS
INTEGRATION
PREDICTIONS OBJECTIVES DATA
BACKGROUND End-user Value prop Sources
ENGINE SPECS ML problem Perf eval Preparation
INTEGRATION Using pred Learning modelINTEGRATION Using pred Learning model
machinelearningcanvas.com

A business level introduction to Artificial Intelligence - Louis Dorard @ PAPIs Connect

  • 1.
    A business-level introductionto Artificial Intelligence @louisdorard #PAPIsConnect - March 14, 2016
  • 2.
  • 10.
  • 11.
  • 12.
  • 14.
    Bedrooms Bathrooms Surface(foot²) Year built Type Price ($) 3 1 860 1950 house 565,000 3 1 1012 1951 house 2 1.5 968 1976 townhouse 447,000 4 1315 1950 house 648,000 3 2 1599 1964 house 3 2 987 1951 townhouse 790,000 1 1 530 2007 condo 122,000 4 2 1574 1964 house 835,000 4 2001 house 855,000 3 2.5 1472 2005 house 4 3.5 1714 2005 townhouse 2 2 1113 1999 condo 1 769 1999 condo 315,000
  • 15.
    Bedrooms Bathrooms Surface(foot²) Year built Type Price ($) 3 1 860 1950 house 565,000 3 1 1012 1951 house 2 1.5 968 1976 townhouse 447,000 4 1315 1950 house 648,000 3 2 1599 1964 house 3 2 987 1951 townhouse 790,000 1 1 530 2007 condo 122,000 4 2 1574 1964 house 835,000 4 2001 house 855,000 3 2.5 1472 2005 house 4 3.5 1714 2005 townhouse 2 2 1113 1999 condo 1 769 1999 condo 315,000
  • 17.
    Bedrooms Bathrooms Surface(foot²) Year built Type Price ($) 3 1 860 1950 house 565,000 3 1 1012 1951 house 2 1.5 968 1976 townhouse 447,000 4 1315 1950 house 648,000 3 2 1599 1964 house 3 2 987 1951 townhouse 790,000 1 1 530 2007 condo 122,000 4 2 1574 1964 house 835,000 4 2001 house 855,000 3 2.5 1472 2005 house 4 3.5 1714 2005 townhouse 2 2 1113 1999 condo 1 769 1999 condo 315,000
  • 18.
    ML is aset of AI techniques where “intelligence” is built from examples
  • 20.
    20 Everyday use cases •Real-estate • Spam • Priority inbox • Crowd prediction property price email spam indicator email importance indicator location & context #people Zillow Gmail Gmail Tranquilien
  • 21.
  • 22.
    I. Get morecustomers II. Serve customers better III. Serve customers more efficiently
  • 23.
    I. Get morecustomers • Reduce churn • Score leads customer churn indicator customer revenue
  • 24.
    II. Serve customersbetter • Provide the right products • Optimize pricing • Use predictive enterprise apps… customer & product purchase indicator product & price #sales
  • 25.
    III. Serve customersmore efficiently • Predict demand • Automate tasks • Use predictive enterprise apps… context demand credit application repayment indicator
  • 26.
    Predictive enterprise apps •Social media filtering • Message routing tweet actionability indicator request employee RULES
  • 27.
    –Katherine Barr, Partnerat VC-firm MDV "Pairing human workers with machine learning and automation will transform knowledge work and unleash new levels of human productivity and creativity."
  • 28.
  • 29.
    1. Descriptive 2. Predictive 3.Prescriptive
 29 Types of analytics
  • 30.
    1. Show churnrate against time 2. Predict which customers will churn next 3. Decide what to do about each customer
 (e.g. propose to switch plan, send promotional offer, etc.) 30 Churn analysis
  • 31.
    “Decide what todo about each customer”→ prioritised list of actions, based on… • Customer representation + context • Churn prediction & action prediction • Uncertainty in predictions • Revenue brought by customer & Cost of actions • Constraints on frequency of solicitations 31 Churn analysis
  • 32.
    1. Show pastdemand against calendar 2. Predict demand for [product] at [store] in next 2 days 3. Decide how much to ship • Trade-off: cost of storage vs risk of lost sales • Constraints on order size, truck volume, capacity of people putting stuff into shelves 32 Replenishment
  • 33.
    33 Pricing optimisation From DavidJones (@d_jones, see source)
  • 34.
    3. Decide pricegiven product and context… • For several price candidates (within constrained range): • Predict # sales given product, context, price • Multiply by price to estimate revenue 34 Pricing optimisation
  • 35.
    3. Decide pricegiven product and context… • For several price candidates (within constrained range): • Predict 95%-confidence lower bound on # sales given product, context, price • Multiply by price to estimate revenue 35 Pricing optimisation
  • 36.
    • Context • Predictions •Uncertainty in predictions • Constraints • Costs / benefits • Competing objectives • Business rules 36 Decisions are based on…
  • 37.
    1. Descriptive analytics 2.Predictive analytics 3. Prescriptive analytics 4. Automated decisions 37 Beyond prescriptive analytics…
  • 38.
    • Spam filter→ decide to skip inbox • Autonomous Vehicles → decide who to kill 38 Autonomous decision-making systems “Tool AI”vs“High-stakes autonomous AI”
  • 39.
  • 40.
    Software components forautomated decisions: • Create training dataset from historical data (merge sources, aggregate…) • Provide predictive model from given training set (i.e. learn) • Provide prediction against model for given context • Provide optimal decision from given contextual data, predictions, uncertainties, constraints, objectives, costs • Apply given decision 40 Separation of concerns
  • 41.
    Software components forautomated decisions: • Create training dataset from historical data (merge sources, aggregate…) • Provide predictive model from given training set (i.e. learn) • Provide prediction against model for given context • Provide optimal decision from given contextual data, predictions, uncertainties, constraints, objectives, costs • Apply given decision 41 Application-specific component
  • 42.
    Software components forautomated decisions: • Create training dataset from historical data (merge sources, aggregate…) • Provide predictive model from given training set (i.e. learn) • Provide prediction against model for given context • Provide optimal decision from given contextual data, predictions, uncertainties, constraints, objectives, costs • Apply given decision 42 Optimization / Operations Research component
  • 43.
    Software components forautomated decisions: • Create training dataset from historical data (merge sources, aggregate…) • Provide predictive model from given training set (i.e. learn) • Provide prediction against model for given context • Provide optimal decision from given contextual data, predictions, uncertainties, constraints, objectives, costs • Apply given decision 43 Machine Learning components
  • 44.
    Software components forautomated decisions: • Create training dataset from historical data (merge sources, aggregate…) • Provide predictive model from given training set (i.e. learn) • Provide prediction against model for given context • Provide optimal decision from given contextual data, predictions, uncertainties, constraints, objectives, costs • Apply given decision 44 Predictive APIs
  • 45.
  • 46.
    The two phasesof machine learning: • TRAIN a model • PREDICT with a model 46 Predictive APIs
  • 47.
    The two methodsof predictive APIs: • TRAIN a model • PREDICT with a model 47 Predictive APIs
  • 48.
    The two methodsof predictive APIs: • model = create_model(‘training.csv’) • predicted_output, confidence = create_prediction(model, new_input) 48 Predictive APIs
  • 49.
    Cloud: • Amazon ML •BigML • Google Prediction • PredicSis 49 Providers of REST http Predictive APIs Open source: • Seldon • PredictionIO
  • 50.
  • 55.
    1. Need examplesof inputs AND outputs
  • 56.
    2. What ifnot enough data points?
  • 58.
    3. What ifsimilar inputs but dissimilar outputs?
  • 60.
    Bedrooms Bathrooms Price($) 3 2 500,000 3 2 800,000 1 1 300,000 1 1 800,000
  • 61.
    Bedrooms Bathrooms Surface(foot²) Year built Price ($) 3 2 800 1950 500,000 3 2 1000 1950 800,000 1 1 500 1950 300,000 1 1 500 2014 800,000
  • 62.
    “Garbage In, GarbageOut” “A model can only be as good as the data it was given to train on”
  • 63.
  • 64.
    Make sure that… •All efforts are directed at solving the right problem for your company • You’re using the right algorithm, infrastructure, or ML solution for that problem • Team members understand each other (developers, data scientists, product managers, business executives) 64 Before you start implementing
  • 65.
  • 66.
    PREDICTIONS OBJECTIVES DATA Context Whowill use the predictive system / who will be affected by it? Provide some background. Value Proposition What are we trying to do? E.g. spend less time on X, increase Y... Data Sources Where do/can we get data from? (internal database, 3rd party API, etc.) Problem Question to predict answers to (in plain English) Input (i.e. question "parameter") Possible outputs (i.e. "answers") Type of problem (e.g. classification, regression, recommendation...) Baseline What is an alternative way of making predictions (e.g. manual rules based on feature values)? Performance evaluation Domain-specific / bottom-line metrics for monitoring performance in production Prediction accuracy metrics (e.g. MSE if regression; % accuracy, #FP for classification) Offline performance evaluation method (e.g. cross-validation or simple training/test split) Dataset How do we collect data (inputs and outputs)? How many data points? Features Used to represent inputs and extracted from data sources above. Group by types and mention key features if too many to list all. Using predictions When do we make predictions and how many? What is the time constraint for making those predictions? How do we use predictions and confidence values? Learning predictive models When do we create/update models? With which data / how much? What is the time constraint for creating a model? Criteria for deploying model (e.g. minimum performance value — absolute, relative to baseline or to previous model) IDEASPECSDEPLOYMENT
  • 67.
  • 68.
  • 69.
    PREDICTIONS OBJECTIVES DATA BACKGROUNDEnd-user Value prop Sources ENGINE SPECS ML problem Perf eval Preparation INTEGRATION Using pred Learning modelINTEGRATION Using pred Learning model
  • 70.