You are on page 1of 94

Week 3: Augmented Analytics: Smart Predict

Unit 1: Introduction
Introduction
Goals of this week

During this week, you will


▪ Discover the predictive features of SAP Analytics
Cloud
▪ Understand how these predictive features interact
with others SAC capabilities
▪ Understand how to choose the best predictive
scenario to answer a business issue
▪ Learn how to create a predictive scenario in SAC,
and how and where predictive outputs can be
consumed

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2


Introduction
What will your new skills be?

After this course, you will be able to


▪ Answer your use cases with SAC predictive
capabilities
▪ Prepare end-to-end SAC predictive use cases that
answer your business issues
▪ Demonstrate the unique value of predictive
capabilities in SAC

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


Introduction
Evolution of decision making

Linear Dynamic Augmented

▪ Historical ▪ Self service ▪ AI-driven


▪ Static ▪ Fast iterations ▪ Instantaneous adjustments
▪ Top-down & costly ▪ Distributed ▪ Continuous

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Introduction
The digital enterprise is evolving into embedded intelligence

Productivity Industrial Business Process Digital Intelligent


Automation Automation Transformation Enterprises

High Value Tasks

Repetitive Tasks

Automation

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


Introduction
Machine learning is a difficult process for non-experts

▪ Navigate in the data sources to identify target & population


▪ Generate significant features
▪ Choose the right algorithm
▪ Analyze the performance, stability, accuracy
▪ Iterate between data preparation and algorithm parameters
▪ Prepare the data for the application of the predictive model
▪ Integrate the predictions or the model itself in business applications

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


Introduction
Machine learning solutions lack adoption

Why?
▪ Overly complex

<20% ▪ Require data science expertise


▪ Lack of a simple user interface

of business analysts use


advanced analytics The Opportunity:
because of the tools ▪ 50% or more of advanced analytics to be done by
available “citizen data scientists” – Gartner

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


Introduction
Decision making is a continuous process

PLAN DISCOVER

LEARN
ACT ADAPT ANALYZE
EXPLAIN

PREDICT

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8


Introduction
The Intelligent Enterprise framework

The Intelligent Enterprise features


3 key components:

Intelligent Suite

Digital Platform

Intelligent Technologies

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9


Introduction
Intelligent decisions with SAP Analytics Cloud

Complete Contextual Confident


From data to intelligence – Insight to action in the context Make confident decisions
everything you need of your business process faster with AI-driven insights
delivered to you naturally

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


Introduction
Complete

From data to intelligence – everything you need

One From Data For All


Experience To Intelligence Decision Types

Discover, analyze, plan, and Make end-to-end decisions with Scale to meet the needs of your
predict in one user experience data management and analytics business and diverse users
across all devices together in one place across all decision types
(strategic, operational, and tactical)

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 11


Introduction
Contextual

Insight to action in the context of your business process

Insight Data Intelligent


to Action Literacy Network
Plan, analyze, and execute Increase data literacy, engagement, Tap into the collective intelligence
within your business process for and accountability, with a common gained from the world’s largest
instant insight to action business language and built-in business applications cloud
collaboration capabilities

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 12


Introduction
Confident

Make confident decisions faster with AI-driven insights delivered to you naturally

Conversational Automated Predictive

Ask questions in a conversational Detect drivers of a KPI and take the Predict potential outcomes and
manner with instant results next best action using automated forecasts with the push of a button
explained in natural language machine learning that discovers
unknown relationships in data

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 13


Introduction
The augmented analytics journey

Predictive
Automation

Automated
Discovery

Conversational
AI

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 14


Introduction
A faster way to find answers – Conversational AI

▪ Ask questions in natural language and


instantly generate the best visualizations
▪ Recognize important trends with the click
of a button
▪ Enhance visualizations with in-context
explanations

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 15


Introduction
Understand what drives your business – Automated discovery

▪ Jump-start your exploration with insights


and visualizations tailored to your
business
▪ Self-service machine learning identifies
interesting patterns hidden in your data
▪ Detect how different factors influence
business performance
▪ Discover anomalies and take corrective
action

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 16


Introduction
Anticipate the future – Predictive automation

▪ Transform the way you analyze and plan


with AI-driven predictions
▪ Enable business analysts to build trusted
and actionable predictions with ease
▪ Create recommendations for the next
best course of action
▪ See your business in high resolution
with insights into each of your customers,
vendors, and suppliers

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 17


Introduction
Across the information lifecycle

Across the information lifecycle


▪ Discover business drivers
▪ Simulate and plan
▪ Visualize progress
▪ Optimize your next action Planning Business
& Analysis Intelligence

Predictive
Analytics

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 18


Introduction
SAP Analytics Cloud Smart Predict vision: Business inputs are the key, not technology

▪ What do I want to obtain as predictive information and what is the


business context?
I expect to obtain the likelihood that customers churn in 3 months; I need
to obtain the daily demand forecast for spare parts for each reference, …
▪ What is the perimeter of the data that I find relevant and/or
mandatory to use?
I must avoid the year 2015 because of the economic crisis; I must avoid
last Monday because too many call-center operators were missing, …
▪ What are the computational conditions of this predictive
information?
I want to obtain the predictive output for the whole customer portfolio,
even if it takes 1 day to obtain; I want to forecast sales in EMEA only, …
▪ How do I want those insights to be refreshed?
I need to select customers for outbound calls every Monday at 7am;
I want to obtain the refreshed forecasts on a sliding window of
6 months, …

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 19


Introduction
Predictive scenario: the Smart Predict workspace

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 20


Introduction
Predictive scenario: guide and automate

▪ BI users choose the predictive scenario that


corresponds to their business issue
▪ In this workspace, users are fully guided to
− prepare the predictive dataset
− automatically generate the best predictive model
− check their accuracy and stability in time
− compare the results by testing several business inputs
▪ They can also define the refresh policy

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 21


Introduction
Smart Predict user workflow: principles

▪ No coding
▪ No technical terminology
▪ Guided workflow with business-oriented questions
▪ Quick results shown
▪ Auto-improvement by iterations *
▪ Enrichment with data and semantics when needed *

(*) Waves
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 22
Introduction
Smart Predict user workflow

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 23


Introduction
Predictive outputs consumption

▪ Predictive insights/outputs can be consumed in


SAC BI stories & will be in SAC Planning stories
▪ Insights/outputs can be exported outside of SAC:
− export to databases: live connection
− export csv files
− export the settings needed by SAP business
applications to generate insights/outputs on
their own framework

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 24


Introduction
Smart Predict: an option that leverages SAC predictive capabilities

▪ With Smart Predict, SAC BI & Planning users


will get detailed predictions that can be
leveraged in any SAC stories & outside SAC.
The Smart Analytics Journey
The predictive scenario itself can be
published in SAP business applications

Artifical Intelligence,
Made Accessible

Explain Anything
with a Single Click

Faster Answers,
Delivered Naturally

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 25


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2019 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of
SAP SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or
warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty
statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or
any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation,
and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and
functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason
without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ
materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they
should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.
Week 3: Augmented Analytics: Smart Predict
Unit 2: Use Cases and Smart Predict Predictive
Scenario
Use Cases and Smart Predict Predictive Scenario
What is the difference between analytics and predictive analytics?

Analytics creates visualizations of historic data which give you data insight

Predictive analytics forecasts future events

Putting analytics and predictive analytics in the same box allows customers to
benefit from a larger vision to instantaneously make better decisions

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2


Use Cases and Smart Predict Predictive Scenario
Choose the right predictive “option”

Why?
▪ Make sure that the predictive project will really answer the
business question

Before doing anything else


▪ Understand the question(s)
Business need
Business goal
Output(s) expected by the decision-makers

How to do it
▪ Formalize the question
▪ Choose the right function: let’s call it “predictive scenario”

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


Use Cases and Smart Predict Predictive Scenario
Use case: optimizing a marketing campaign


Increase market share by
Aim growing revenue

Increase number of
Actions successful cross-sells

Accepted marketing pressure,


Bottleneck i.e. 2 contacts per month

Which product should


Predictive be promoted in the next
marketing contact?

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Use Cases and Smart Predict Predictive Scenario
Call the contact with the highest chance of success first

Your known contacts: customers, prospects, … But who is it?

Data Analyst Marketer

Which product should be


promoted in the next
marketing contact

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


Use Cases and Smart Predict Predictive Scenario
Learn from the past

Who bought last time?

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


Use Cases and Smart Predict Predictive Scenario
Who bought last time?

Find a rule to separate both groups

Train a predictive model, which separates the CLASSIFICATION RULE


groups as much as possible

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


Use Cases and Smart Predict Predictive Scenario
Make the best model

Train on part of the history.


Test on the other part of the history.
Provide as much detail on the contacts as CLASSIFICATION RULE
possible. Any information can help separate
the groups
▪ Age
▪ Gender
▪ Martial status
▪ Sales current year
▪ Sales previous year
▪ Change of sales between years
▪ Number of contacts/visits
▪ Payment history
▪ Outstanding payments
▪…
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8
Use Cases and Smart Predict Predictive Scenario
Learn from the past

Apply the rule on potential customers

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9


Use Cases and Smart Predict Predictive Scenario
Learn from the past

Call only the ones with highest probability!


Start on top!

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


Use Cases and Smart Predict Predictive Scenario
Use case: predict house price by looking at similar properties in the neighborhood

Get right estimation of


Aim house price

Propose suitable price Real Estate


Actions to sell house
Agent

Bottleneck Number of cases

Propose the most suitable


Predictive price to sell the house faster

Data Analyst
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 11
Use Cases and Smart Predict Predictive Scenario
How can we predict house prices?

Provide details on houses previously sold


▪ Living area
▪ Number of rooms
▪ Size of plot
▪ Garage
▪ Kitchen
▪…
▪ Number of visits to sell
▪ Price
▪…
▪ Environment
▪…

Data Analyst Real Estate Agent

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 12


Use Cases and Smart Predict Predictive Scenario
Regression will provide suitable estimation of the price

What is Regression? Linear regression formula: Y = B0 + B1X1 + B2X2 + … + BnXn


Regression is a statistical analysis A simple linear regression model has two kind of
technique that investigates the variables. Xi are the explanatory variables and Y is the
relationship between a dependent target variable (the value to be explained or to predict).
(target) and one or more
independent (explanatory) variables.

In predictive analytics, regression


can be used to predict an unknown
numerical value of a target variable. Over-Fit Model/Low Robustness Under-Fit Model/High Robustness
(No Training Error, High Test Error) (High Training Error = High Test Error)

Output
Continuous (numerical) value
Model built
Known data
Robust Model
New data
(Low Training Error  Low Test Error)
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 13
Use Cases and Smart Predict Predictive Scenario
Train a regression model

Train on part of the history. Test on the other part of the history.

Iterative process to get the best model or equation where the Xn are the most contributive variables
describing the houses

Model built
Known data Data Analyst

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 14


Use Cases and Smart Predict Predictive Scenario
Apply a regression model

When the model is applied to new houses to sell, the real estate agent gets a
proposal of a price which matches the market

Real Estate Agent Model built


Known data
New data

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 15


Use Cases and Smart Predict Predictive Scenario
Use case: optimize manufacturing quantities and use of warehouse

Increase customer
Aim satisfaction

Improve ability to deliver goods


Actions immediately on receipt of order Production Manager

Production time and cost, space


Bottleneck in warehouse, capital investment

Which quantities of the different products


Predictive should be produced in advance?

Data Analyst
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 16
Use Cases and Smart Predict Predictive Scenario
Optimize manufacturing quantities and use of warehouse

Data Analyst Production Manager

2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC


© 2019 17
Use Cases and Smart Predict Predictive Scenario
Demand forecast: time series

Breakdown of the time series into its components


▪ Trend
▪ Seasonality & periods that are cycles
▪ Predictable fluctuations
▪ Residuals
Fluctuations
Data Analyst

Trend

Cycles

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 18


Use Cases and Smart Predict Predictive Scenario
Best model and forecast

The best model is a combination of: Trend + Cycles + Fluctuations

When equation for this model is applied to time in the future (Feb 2002), we obtain
the forecasted values. Data Analyst

Product Qty Product Qty Forecast Product Qty Trend Outliers


© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 19
Use Cases and Smart Predict Predictive Scenario
Key takeaway

In this session, through use cases, you learned about


▪ Classification,
▪ Regression and
▪ Time series forecasting
In the next session, we will take a closer look at time
series forecasting and a demo of it with Smart Predict

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 20


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2019 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of
SAP SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or
warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty
statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or
any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation,
and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and
functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason
without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ
materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they
should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.
Week 3: Augmented Analytics: Smart Predict
Unit 3: Segmented Time Series
Segmented Time Series
What is a signal?

▪ A signal in its broader sense is a measure seen over time


– Revenue of a shop aggregated daily from the transactions
– Number of calls to a call center aggregated hourly
▪ It shows ONE object of interest at a time
– In the above examples, the object of interest is the shop /
the call center
– It could be a region, a product, a product category …
▪ Its representation is a time series

▪ Typical questions time series may answer


– How the revenue of my shop will be in the next months?
– What are the expected sells by product per regions for
the next weeks?

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2


Segmented Time Series
Forecasting – How far?

▪ The prediction horizon is how far in the future we need forecasted values

Available Historical Data Forecasts


NOW
▪ The further you forecast, the less accurate the forecasts
▪ Predicting the next 10 years with 3 months of data is not possible!
▪ As for any other prediction, the definition of the horizon depends on the business needs,
and therefore on how it will be used

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


Segmented Time Series
Signal granularity – Should I aggregate hourly, daily, weekly, monthly, …?

▪ Again, this is linked mostly to the business usage of the results.


▪ However certain constraints apply:
– Very noisy signals: extend the period to smooth the signal
Example: sales of slow moving products
– Very few observations: sometimes forecasts are impossible to build…

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Segmented Time Series
Forecasting – Provide future values of the signal

▪ The objective is to estimate the signal for future dates


▪ In SAC Smart Predict, the way it is done is through signal breakdown
SIGNAL = TREND + PERIODIC + FLUCTUATION + RESIDUAL
▪ TREND: long-term evolution of the signal
▪ PERIODIC: patterns in the signal that reproduce over time
(cyclic and seasonal)
▪ FLUCTUATION: dependency of the values at time T with previous values
(dependence of the observations)
▪ RESIDUAL: part of the signal not explained by the other 3 components

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


Segmented Time Series
Forecast predictive model in Smart Predict – Principles

Signal

Trend Compute a set of candidate trends (8)

Test if more cycles are possible

Periodic Detect a periodic component on each detrended signal (8)

Fluctuation Add autoregressive models on signal residues (up to 8)

Model Selection Select the best model among the combinations

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


Segmented Time Series
Forecasts – Trends

▪ The TREND is the long-term evolution of the signal


▪ It includes
– Fitting a shape on the signal (linear or polynomial)
– Evaluating relationships with ExtraPredictors (linear or non-linear)
– Using stochastic approach (L1, L2 …) (means the forecast at time T will depend on the past values of the
signal)

˗˗˗˗˗˗˗ Linear trend

˗˗˗˗˗˗˗ Polynomial trend

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


Segmented Time Series
Forecasts – Cycles

A periodic cycle does not depend on the date and is defined by the number of time units it covers.
A seasonal cycle depends on the date or time. For example, the day of the month, the hour of the day, and so
on

Smart Predict tests cycles systematically

Seasonalities are the same but apply


on Seconds (S), Minutes (Mi), Hours
(H), Days of Week (DoW)/Month
(DoM)/Year (DoY), Week of Month
(WoM)/Year (WoY), Month (M), Month
of Quarter (MoQ)/Year (MoY), Quarter
of Year (QoY), Year (Y) …

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8


Segmented Time Series
Forecasts – Fluctuations

▪ The fluctuation is what is left when the trend and the


cycles have been extracted. It is modeled with an
auto-regression that uses a window of past data to
model the current residue. The number of
observations in the window is determined by time
series depending on the total number of observations
in the estimation dataset.
▪ It models the dependency of the values at time T with
previous values (dependence of the observations).
▪ It tests over 1/3 of the dataset if each value depends
on the previous ones.

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9


Segmented Time Series
Forecasts – Residuals

▪ Residuals is what remains of the signal once trend(s),


periodics, and fluctuations have been removed
▪ Residuals have to be as small as possible
▪ They also have to be distributed evenly around 0
▪ These are considered purely random effects
(also called white noise)

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


Segmented Time Series
What is a good forecast?

▪ Model is a combination of:


Trend + Cycles + Fluctuations
▪ How to measure the accuracy of a forecast: MAPE (Mean Absolute Percentage Error)
1 𝑛 𝐴𝑐𝑢𝑡𝑎𝑙𝑖 − 𝑃𝑟𝑒𝑑𝑖𝑐𝑡𝑒𝑑𝑖
▪ Individual MAPE = σ where n is the number of records in the validation dataset
𝑛 𝑖=1 𝐴𝑐𝑡𝑢𝑎𝑙𝑖

▪ Smart Predict uses the Horizon-Wide MAP, which is the average of the individual MAPE corresponding to the requested
horizon.
▪ Interpretation: equal 0 ➔ Perfect model
above 1 ➔ Bad quality model

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 11


Segmented Time Series
Model selection process summary

▪ Models are selected based respectively on:


– Performance: MAPE indicator; the smaller, the better
– Complexity: the simpler, the better
– Horizon: the longer, the better

➔ The « best » model is the simplest function with the lowest error on the longest term possible.

MAPE. Loss in MAPE is accepted based on model


Performance Measure complexity and/or horizon only when under 5%.

Model Complexity Based on the number of components of the model

When two models are equivalent in MAPE and


Model Horizon complexity, the model with longer horizon is selected

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 12


Segmented Time Series
Why time series?

▪ Difference between a forecast and a “simple“ regression-based approach


− Interpolation vs. Extrapolation
▪ Regression problem
− “Fill holes” with estimates
▪ Forecasting
− Project yourself in the future
− Date-dependent and ordered data Regression: Interpolation
− Go beyond observed events

Model Built
Known Data
New Data Forecast: Extrapolation

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 13


Segmented Time Series
Key takeaways

▪ In this session, you learned


– What time series forecasting is
– How Smart Predict breaks down the time series
signal to create the best predictive model
– What the differences between a regression and
time series forecasting are
▪ In the next session, we will take a closer look at
classification and a demo of it with Smart Predict.
▪ But for the moment, let’s do a demo of Smart
Predict time series forecasting

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 14


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2019 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of
SAP SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or
warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty
statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or
any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation,
and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and
functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason
without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ
materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they
should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.
Week 3: Augmented Analytics: Smart Predict
Unit 4: Segmented Time Series – Demo
Segmented Time Series – Demo
Demo scenario

The United States Census Bureau conducts annual surveys to


assess the finances of elementary and high schools, and the
dataset contains a summary of revenue and expenditure for the
years 1992-2016, organized by state.
In this demo, I’ll review and analyze the revenue and expenditure
of the past years and explore both expenditure and revenue across
all 50 states.
During my exploration, I discover that the revenue and expenditure
patterns are different for each state, and one model cannot work
well for all states.
To improve the forecasting accuracy, it is necessary to model each
state separately, and this requires 50 models as we have 50 states.

Takeaway:
▪ Create and analyze a predictive forecast scenario
▪ Integrate forecasts in a BI story
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2
Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2019 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of
SAP SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or
warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty
statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or
any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation,
and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and
functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason
without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ
materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they
should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.
Week 3: Augmented Analytics: Smart Predict
Unit 5: Classification
Classification
Classification datasets – Rows

▪ When devising a dataset for a classification or a regression, the first step


is to define the row of the dataset
▪ This is constrained by the way the results will be used
▪ The “object of interest” defines this
− a customer seen at a given time
− a transaction
− a machine seen at a give time
▪ Because of this, the object of interest MUST be unique in the dataset
▪ Think about the fact that the rows present in the dataset can be there
▪ Define the relevant filters
− someone who already churned cannot be included in a dataset meant
to predict who might churn!

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2


Classification
Classification datasets – Columns

▪ Among the columns, one has a specific role. We call it the target. It is the
object of interest.
▪ In Smart Predict, if the target is
− binomial (2 categories), a classification can be used
− continuous, a regression can be used

We cannot use what is not known to learn, i.e. the target cannot have missing values.

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


Classification
Classification and regression: What are they for?

Classification is about producing the probability that an event will happen

Who among my customers is likely to react positively to my outbound marketing campaign?

Regression is about estimating a number

How much would they spend on my e-site if they did?

Classification

Model Built
Known Data
New Data
Regression: Interpolation

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Classification
Classification is more about ranking than clustering

???

Customers who are


most likely to answer
positively
Classification
Customers who are
less likely to answer
positively

Above this limit: do not contact them – no ROI


This limit (threshold) depends on the operational constraints
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5
Classification
Classification and regression – How to assess quality

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


Classification
Predictive power and prediction confidence

▪ Red line is no model (i.e. random picking)


▪ Green curve is perfect model (i.e. if I know in
advance)
▪ Yellow and blue curves correspond to the
percentage of positive cases when ordering by
decreasing score/probability

Predictive power represents how close to the perfect model the model is (quality)
Area between Validation and Random curves divided by the area between Perfect and Random curves = C/(A+B+C)
= 0 ➔ Bad quality >= 0.98 ➔ certainly dependent variables between 0.75 and 0.97 ➔ quality acceptable

Prediction confidence expresses the ability to reproduce the same detection (robustness)
You need a « validation sample » to estimate this KPI: it represents another view of the same population
1 – (area between Validation and Training) / (area between Perfect and Random) = 1- B/(A+B+C)
>= 0.95 ➔ good robustness
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7
Classification
Variable contribution – Predictive models are not black boxes

▪ Shows the relative contribution of each variable in


the model. It represents how a variable influences
the event that you want to predict
▪ For each variable, you can also pay attention to the
influence of the categories (age ranges, product
lines, …)
− The way the categories impact the model are
shown in the debrief under section “Grouped
Category Influence”
− Grouped Category Statistics shows each group
with its frequency of positive cases and its global
frequency

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8


Classification
Confusion matrix – Choose the threshold

The confusion matrix is a way to navigate in the curve « % detected target »

I have the budget to contact 30% of the population

75% of the customers who would be


interested by my proposition will be in
my selection (and 25% will not)

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9


Classification
Confusion matrix – Choose the threshold

▪ The confusion matrix is provided to SAC Smart Predict


users to select the threshold in full knowledge of the
consequences
▪ The « errors » can be expressed differently, depending
on what is significant for the business: costs, results,
risk level, …

FP/(FP+TN)

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


Classification
Profit simulation – Optimize the threshold automatically

▪ Estimate the optimal percentage of population to contact to get maximum ROI


▪ This implies knowing average costs and gains
▪ ROI = Probability x Gain – Cost

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 11


Classification
Key takeaways

You have learnt :


1) What a classification is and when to use it and
2) The steps of a classification workflow in SAC Smart Predict
– Create and train a predictive scenario
– Inspect our dataset to get insights
– When to use a classification
– Use the results of a classification

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 12


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2019 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of
SAP SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or
warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty
statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or
any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation,
and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and
functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason
without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ
materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they
should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.
Week 3: Augmented Analytics: Smart Predict
Unit 6: Classification Demo
Classification Demo
Demo scenario

▪ Valerie is an HR manager and is interested in ways to improve HR policies.


The goals of the HR department are:
− Improve employee satisfaction to reduce resignations
− Reduce cost of training and ramp-up of new employees, and
− Hire better talent.

▪ Objectives with Smart Predict are:


1. Understand reasons for disaffection
2. Act on these reasons proactively to avoid losing employees
3. Identify which employees might potentially leave the organization

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2


Classification Demo
What we will do

1. Explore the dataset


2. Build and train a predictive scenario
3. Understand the debrief of the predictive model
4. Apply the predictive model on employees to learn if they are
risks

DEMO!

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2019 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of
SAP SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or
warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty
statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or
any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation,
and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and
functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason
without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ
materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they
should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.
Week 3: Augmented Analytics: Smart Predict
Unit 7: Using Predictions in a BI Story
Using Predictions in a BI Story
Demo scenario

1. Explore the dataset


2. Build and train a predictive scenario
3. Understand the debrief of the predictive model
4. Apply the predictive model on employees to learn if they are risks
➔ the result was the creation of an output dataset

Enhance the story to easily get the prediction of risk for each employee and take action (or not).
DEMO!
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2
Using Predictions in a BI Story
Key takeaway

Now, at the end of this demo, you know how to include results of a classification
inside a BI story to get better visualization of the predictions.

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


Using Predictions in a BI Story
Conclusion

1. Definition of augmented BI at SAP


2. Use cases used to explain classification, regression, and time
series forecasting
3. Demos of:
– Segmented time series forecasting scenario
– Classification scenario
– Integration of predictions inside a BI story

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2019 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of
SAP SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or
warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty
statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or
any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation,
and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and
functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason
without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ
materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they
should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.

You might also like