1 2 3 8 Previous Next

SAP Predictive Analytics

115 Posts

Part 1 is here Analytics Innovations Community Call: SAP Predictive Analytics Notes Part 1


First, another poll:



Source: SAP


The poll above shows that the biggest barrier to adopting Predictive Analytics (per 43%) is cost.


Source: SAP


SAP's Charles Gadalla provided this part of the session.


Predictive Analytics 2.0 combines both Predictive Analysis 1.x and SAP InfiniteInsight as shown above


Source: SAP


Predictive Analytics 2.0 offers BW offline support (including the BEx Query), a recommendation engine in one component, APL for HANA SPS9 – sister library to the PAL library – on AFL of HANA

Charles said to look for wide datasets – lots of fields, variables


Source: SAP


It uses "Smart BI" with the "light bulb" in Lumira which comes from KXEN


It supports Big data


In the green  boxes, under future direction, there will be a unified UI with one seamless experience, supporting massive analytics and huge datasets


APL offer auto algorithms to optimize


Source: SAP


Skyrock is aompany in France with 2x increase in acceptance rate using predictions and personalized recommendations


Questions and Answers

Q: What are some key use cases?

A: Churn, loyalty, freemium to premium


Q: Roadmap talked about Hadoop – what is integration with Hadoop?

A: Work closely with distributions for Hadoop – connect to Hadoop, Hive, Spark interface


Q: What is roadmap with integration of R?

A: R is already integrated


Q: What training is available for business analysts to make the right choice

A: tutorials, official training program


Another poll appeared:


Source: SAP


Yet another poll:


Source: SAP


The business analyst will build models; the above adds up to more than 100% because you could select multiple answers.


There was a demo of predictive analytics using hybris.  Embedding the prediction analytics inside your operational applications is interesting.



Meet Charles at ASUG Annual Conference in this session: BI109 Predictive Analytics 2.0: Roadmap, what's new and what's next

ASUG BI Schedule 2015.xlsx | ASUG


Also some upcoming ASUG Predictive Analytics webcasts are listed below:

These are my notes from today's call.


First, a poll:



Source: SAP


53% of attendees on today's webcast are not using SAP Predictive Analytics.


Source: SAP


The first speaker was Sven Bauszus, SAP.  He said nothing is stronger than an idea whose time has come, and it was "time for a predictive analytics solution" due to simplicity, ease of use, productivity.  Why now?  He mentioned the 4 V’s of big data, and competition, insights, predict and act in time.  He also said it was “not just for statistical experts”.


Source: SAP


The figure above shows how Analytics needs to evolve, with requirements for predict and act

Why did it happen, while will it happen

How can we make it happen?


Predictive Analytics take a step further by taking action


Descriptive is part of predictive analytics


"What is the point of doing predictive analytics if you don't integrate into your operations?"  So prescriptive is needed too.


Source: SAP


Big data goes main stream


More companies leverage data asset


68% of those who use advanced analytics have a competitive advantage and they reduce operational risk


Source: SAP


Above shows the use cases for Predictive Analytics


The SAP speaker said this is not a TCO discussion but a quantifiable return on investment, to help increase in accepting customer offers


Retailer in 1K stores was able to improve sales forecasting and exploit hidden revenue potential, slash inventory costs; builds 500 predictive models a month – models built for shelf planning, store clustering, sales and purchasing planning – 82% accuracy in forecasting, with 10 times more categories than before


The “need for speed” was mentioned with the "Business potential is huge"


Predictive maintenance helps predict when failure occurs, tasks for monitoring for future failure so maintenance occurs before failure occurs to prevent unplanned maintenance


Source: SAP

The first speaker summarized the above with "democratizing predictive analytics" and support real time

Question & Answer

Q: We have many predictive in market, what is so unique about predictive analytics?

A: Combine predictive automation, full support of in memory database scoring, reduces need for data movement

Predictive platform has scoring engine on the back end

Easy to use

Focus on rapid deployment


Q: I am existing BI customer, how can I leverage Predictive & skills on my team?

A: Technology is seamlessly embedded with portfolio


Q: What advantages of Predictive Analytics using SAP HANA

A: In-memory capabilities of HANA; take advantage of power speed and real time of HANA

Predictive Analytics does not require SAP HANA


Part 2 will post soon.



BI pre-conference session at ASUG Annual conference

Monday, May 4. (extra registration fees apply).


Featuring Hands-on SAP BusinessObjects BI 4.1 w/ SAP NetWeaver BW Powered by SAP HANA – Deep Dive

See details here: http://bit.ly/ASUGPreConBI


Focus on Analysis Office, Lumira, and Design Studio. You get to work with these for 7 hours! Full day BI workshop. Limited to 30 people. One person per machine (no sharing).


ASUG BI Annual Conference Schedule with Abstract Links


Also see Upcoming ASUG Business Intelligence Community W... | ASUG


At ASUG BI Annual Conference 2015 Schedule | ASUG there is an Excel version of the grid schedule - also see ASUG BI Schedule 2015.xlsx | ASUG


Also some upcoming ASUG Predictive Analytics webcasts are listed below:

The wait is over! On Feb 27th 2015, we released the first HANA cloud image of SAP Predictive Analytics. Now SAP Predictive Analytics scenarios can be simulated and run on the AWS cloud in the context of HANA. This HANA Cloud image is hosted on AWS which depicts the HANA models and predictive models with data visualization based on a few customer centric scenarios.



Let us get into a quick background of Predictive Analytics RDS and how we arrived at the creation of this image. An RDS for Predictive Analytics has been inspired by the strategic thoughts and initiatives to show case how predictive analytics tools could be realized for customer centric use cases. As part of its inception in 2013, the predictive analytics RDS has modeled a lot of customer scenarios ranging from different industries and LoBs showcasing the different approaches of predictive modeling using Predictive Analysis (now expert analytics in PA 2.0), InfiniteInsight (now automated analytics in PA 2.0), SQL scripting in HANA to utilize native Predictive Analysis Library (PAL).


By the current v4 release of the Predictive Analytics RDS on Feb 23rd 2015, about 30 customer scenarios around 5 industries and 3 LoBs are available. These different scenarios show case the end-to-end story of data gathering from enterprise data sets, data preparation in HANA and modeling the generic objects, doing predictive modeling on key KPIs utilizing one of the approaches(predictive analysis or infiniteinsight or HANA scripting) and finally visualizing the data using SAP BusinessObjects Explorer or SAP Lumira (SAP Predictive Analysis) or SAP UI5.

PA RDS v4.png

Scenarios available in the HANA Cloud Image on AWS:

As part of the Cloud image(that is hosted on AWS), we have made a few scenarios from the RDS already pre-built. This helps the customers to get a complete end-to-end story in the context of HANA. The scenarios that were picked up for the very first version of this cloud image are as follows:

  • Scenarios from Sales & Marketing LoB
    • Customer Segmentation
    • Market Segmentation
    • Better pipeline and revenue forecasting
    • Marketing Campaign success



  • Scenarios from Telco Industry
    • Churn modeling and offer recommendation



You would be able to experience the above scenarios in the context of HANA with enterprise data set that is already available on cloud image.

We have show cased different approaches of doing predictive modeling using the SAP Predictive toolset.

For eg:

  • Enterprise data set using Predictive Analysis (to access HANA PAL) for predictive modeling and data visualization
    • Customer Segmentation use case from Sales & Marketing LoB
    • Market Segmentation use case from Sales & Marketing LoB
  • Enterprise data set using Scripting in HANA (to access HANA PAL) for predictive modeling and data visualization using SAP BusinessObjects explorer
    • Better pipeline and revenue fore casting use case from Sales & Marketing LoB
  • Spreadsheet data set using Predictive Analysis (to access open source R) for predictive modeling and data visualization
    • Marketing Campaign Success use case from Sales & Marketing LoB
  • Call data records and transactions using InfininiteInsight (to access the InfiniteInsight predictive library) for predictive modeling and data visualization using SAP Lumira
    • Churn modeling and offer recommendation from Telco Industry


Architecture of the Cloud Image:

The pre-built HANA cloud image is available(in the SAP store) for a trial period of 15 days. During this time, there is no additional cost to access this image as long as you have an AWS account. The cloud image is hosted on AWS and hence you will need to pay a nominal fee towards AWS but the access to HANA cloud image is available for trial and evaluation purposes in the context of customer centric scenarios.

PA CAL Arch.png



In the upcoming weeks, the HANA cloud image shall be updated with many more scenarios from the RDS story as well make it available on the latest Predictive Analytics tools. Please stay tuned for more information in this regard. The current HANA cloud image explains and showcases the concept behind using the data from HANA, doing the predictive modeling using all the different approaches of Predictive Analysis or InfiniteInsight or HANA scripting. The concepts remain the same but we shall be upgrading to the latest versions of the tools. The current concept or the best practices image available as an enterprise HANA cloud image is upward compatible.


Please click here to access the HANA Enterprise Cloud image for Predictive Analytics on AWS in the SAP Store.

So last week I shared my initial clustering analysis using SAP Predictive Analytics 2.0 (Expert Analysis) Looking back at NCAA Basketball Clustering Analysis - Reviewing the Results


Sadly, it did reveal that my team, Kansas, didn't stand a chance of winning yesterday's game against Wichita State (congratulations to Wichita State).  Kansas was the only team in cluster 4 who won the first round.  Did this help heal my wounds of losing?  No...I'm reminded of Dr. Smith from Lost in Space:


"The pain of it all" - but life goes on, and there's more data to review.  So today, I took the winning "Sweet Sixteen" teams and ran autoclustering again




I reduced the number of clusters and looked at winning percentage this time.






I ran the analysis successfully, as shown above




Above shows my clusters resulting from Predictive Analytics.




Parallel Coordinates chart is a little easier to read this time (you can tell Kentucky because they continue to have 0 losses)




Above is the scatter matrix chart from SAP Predictive Analytics


How did the results look?



So 11 teams are in cluster 1 and 5 are in cluster 3


See teams in the crosstab below - first is cluster 1:



Cluster 3 has 5 teams below:



Should I predict based on this?  Kentucky (Cluster 3) over West Virginia (Cluster 1)?


NC State over Louisville?  Utah over Duke?


I am not sure.


Also it doesn't help that Oklahoma and Michigan State are in the same cluster.

So I go back and look at the old clusters (pre-tournament):


Cluster 8 continued:


Cluster 8 had the most wins, so based on this Michigan State is favored over Oklahoma

We'll see what happens this coming weekend.


BI pre-conference session at ASUG Annual conference

Monday, May 4. (extra registration fees apply).


Featuring Hands-on SAP BusinessObjects BI 4.1 w/ SAP NetWeaver BW Powered by SAP HANA – Deep Dive

See details here: http://bit.ly/ASUGPreConBI


Focus on Analysis Office, Lumira, and Design Studio. You get to work with these for 7 hours! Full day BI workshop. Limited to 30 people. One person per machine (no sharing).


ASUG BI Annual Conference Schedule with Abstract Links


Also see Upcoming ASUG Business Intelligence Community W... | ASUG


At ASUG BI Annual Conference 2015 Schedule | ASUG there is an Excel version of the grid schedule


Also some upcoming ASUG Predictive Analytics webcasts are listed below:

So last week I used SAP Predictive Analytics to cluster the teams - see NCAA Teams Automatic Clustering with SAP Predictive Analytics 2.0


How did it match up with the teams selected?  I used the output of Predictive Analytics to analyze the results:




The above shows that cluster 8 has the most teams selected, with cluster 10 a close second.



Cluster 8 has the heavyweight teams like Duke, Kentucky, Virginia.  I can see that when I drill down.  All the 1 seeds in the tournament were in Cluster 8.


I was not surprised when my co-worker told me that Georgia State beat Baylor, because they were in Cluster 8.   Baylor was in Cluster 10.  Was Dayton really a surprise winner over Providence last night?  Not to me, as they were in cluster 8.


The surprise was that Iowa State lost in the first round; they were in cluster 8.



Cluster 8 had the most wins in the first round - 14 out of 19 teams won their first round games as shown above.  Cluster 10 teams won 10 first round games out of 18 teams.


Cluster 5 teams experiences the most losses in the first round.



Cluster 4 only has one win.  Guess who?



Feel free to review my cluster results here on Lumira Cloud.

SAP PA 2.png

Do you know what it is like to have made something really cool but can’t show everyone else yet?  That’s how our product team has been feeling while we have been preparing our SAP Predictive Analytics 2.0 trial download site – but the wait is now over because we are happy to announce that the SAP PA 2.0 30-day trial site is now LIVE and ready for your downloading pleasure!


This is the first version of our advanced analytics product that incorporates both the SAP Predictive Analysis 1.x and SAP InfiniteInsight (formerly KXEN) 7.x codelines into a single installable package.  There’s more yet to come in PA 2.1 and beyond so stay tuned!


Time To Dive In!

To understand what’s really in SAP Predictive Analytics 2.0, you want to take a look at these articles:


Wanna see it in action?  Check out this great article about Viz the Madness: College Basketball Analysis Powered by SAP Lumira & Predictive Analytics.


We have recently announced the schedule for our webinar series dedicated to predictive analytics – everything ranging from the product roadmap to doing your own analysis easily, all the way to large scale advanced analytics using SAP HANA.

And Last But Not Least...

Don’t forget to bookmark the Predictive Analytics SCN community (and better yet, set email alerts so you know when something new is posted).  We have customers, partners, and SAP employees all participating, so the SCN community is *the* place to find the latest on SAP Predictive Analytics.

This was an ASUG webcast given by SAP yesterday with Charles Gadalla and Abdel DADOUCHE



Figure 1: Source: SAP


Bring together two code lines, blue bubble, InfiniteInsight (blue) and SAP Predictive Analysis will be combined into one bubble on the right as the expert and automated come together


Figure 2: Source: SAP


Latest releases become first release in 2.0 – Predictive Analytics 2.0 is the legal successor


It is not bound to the Lumira release cycle


SAP is decoupling code; it will not release on monthly cycle that Lumira


Figure 3: Source: SAP


There are 4 installation packages shown together


Desktop version automated analytics (workstation from InfiniteInsight and expert from Predictive)


Client drives server component (data manager, automated algorithms, scoring, social recommendations)


Expert Analytics only available in desktop installer


Predictive Analysis is on workstation side; there is no server component for Predictive Analysis


Figure 4: Source: SAP


Figure 4 shows the installer scenarios


Please note you need to uninstall old PA to install PA 2.0 as the unified installer will overwrite the libraries


Lumira will need to be uninstalled


Going forward the products will co-exist; for the desktop this includes workstation, client, server, factor


Figure 5: Source: SAP


Figure 5 shows the unified Launchpad


The automated analytics comes from InfiniteInsight


For classic Predictive Analysis  go to Expert Analytics


Figure 6: Source: SAP


Please note that the 30 day trial for Predictive Analytics 2.0 is not available yet; it is coming soon.


Figure 6 shows the keycodes; SAP will work with you on this; SAP has unified the license keys



Figure 7: Source: SAP


Where there were empty segments is now taken care of but preserve model integrity


On the bottom of Figure 7 they have smoothed out the curves without the breaks and segmentation


Figure 8: Source: SAP


Figure 8 shows Hadoop and Spark support; the SIMBA driver is used


Date support is shown in Figure 8; limitations are due to Spark


Figure 9: Source: SAP


Figure 9 covers if you are on the HANA "side of the fence" and what is new with the automated predictive library


The libraries from KXEN are exposed to HANA as APL - more to come


They will create, train, and apply models in HANA


Applications can invoke these


This is giving HANA the flexibility to use




Figure 10: Source: SAP


"Everybody loves BW"


SAP Predictive can do this in the offline mode


It can use the BEx queries as shown in Figure 10


Figure 11: Source: SAP


Figure 11 shows what is new in the PAL components


You can write your own custom PAL components


Similar to the way you could create your own custom R component


R library is the open source library for free


The PAL was created by HANA team to invoke similar R algorithms but you can call it in memory; you get a huge execution


You can prepare your own custom PAL algorithm using the SAP Predictive Analytics 2.0


Question and Answer

Q:  Will the Lumira rooms such as Compose/Share be removed from the "Expert Analytics"  portion of the product?   It seems that the 2 products are meant to be more separate than before since the SAP PA will not be on the Lumira dev schedule

A:  No; as analysts, need to share; step 1 unify code bases - unify code line, deploy/share execute - move to UI5 interface coming.




Q:  can you elaborate on the ease of use for marketing etc. business users without much background knowledge?

A:  In automated modeler, so you don't have to choose algorithm. Business Analyst/marketing doesn't have to know model details




Q:  Users of Lumira server/cloud will not be able to use SAP PA 2,  so that is why I am wondering if the compose/share part will be removed.  Lumira must be on same level as cloud and server.

A:  You can publish to both - same code line; in terms of Predictive having a server - not available today, using KXEN.


Q:  You referenced a blog.  Can I have the link?

A:  http://scn.sap.com/docs/DOC-62547  


Q:  Lumira and SAP PA will be at different versions  so SAP PA will not be at the same version level as server or cloud.

A:  Yes - this is true, so you need to be aware of the notes/release restrictions




Q:  If all the processing all within HANA, is there a way to prevent too much resources being used on HANA?

A:  HANA Studio has ways of identifying resources required; Predictive is passing back an algorithm


Q:  do we provide help to interpret the automated modeler results and suggest next steps etc. for te hbusiness user(again :-)...I think that is most powerful feature of PA 2.0 allowing business/marketing folks to utilize predictive etc.

A:  In automated mode, send the output - demoing now




Q:  Can't find the Trail Version of 2.0 on SAP Store

A: That is coming soon - not available yet




Q:  The product (SAP PA and SAP Lumira are only supported at the latest version.  If the Lumira Cloud is at version 1.23,  then the desktop version needs to be at 1.23  There is where my issue with SAP PA not being on the same maint schedule comes from.

A:  True - decoupling from Lumira, on a slower release cycle; that does not mean they are decoupling from the capability. Will start to OEM the solution so you are not disadvantaged.



I asked for a sneak preview of what is coming to ASUG Annual Conference/SAPPHIRENOW in May.  SAP Predictive Analytics 2.2, something with the HANA Cloud Platform and some "undercover items"


If you are an ASUG member you can watch the recording and demo at https://www.asug.com/discussions/docs/DOC-40642



Expert Analytics (EA) allows users to install R and required pacakages with one click of a button but users may already have R installed and only need the additional packages to work with EA.


This simple step by step guide will help you download and install R manually if you want to manage this process yourself or show you how to get EA do it for you. It’ll also show you how to use packages that are not installed in the default folder.

Steps to Follow

1) Download R installer manually

- Get the installer directly from the R site.  http://cran.r-project.org/bin/windows/base/

- There is a link on the download site to previous installers, it will bring you to http://cran.r-project.org/bin/windows/base/old/

- For the current version of R supported by EA, version 3.1.0, you can get it from http://cran.r-project.org/bin/windows/base/old/3.1.0/

2) Copy R installer to RUNR folder

- Copy the EXE file for the R installer (e.g. R-3.1.0-win.exe) to the folder %TEMP%\sapvi\RUNR

3) Modify DownloadR.bat

- The DownloadR.bat file is called by the EA application in order to download the installer for R. Modify it so that it does not download the installer for R.

- Search for DownloadR.bat in your installation directory. If you are using a 64bit install then choose the file that exists in the R64 folder, otherwise choose the one that is in the R32 folder.

- Typically, the file is located here C:\Program Files\SAP Predictive Analysis\Desktop\plugins\com.sap.pa.runtime.config_1.18.0.201407211912-1096\resources\R64\DownloadR.bat

- Comment out line "IF EXIST %TEMP%\sapvi\RUNR\R-3.1.0-win.exe del %TEMP%\sapvi\RUNR\R-3.1.0-win.exe" and save the file (note: in later versions of the product this R-3.1.0 will be different)

4) Open PA

- Open PA and select the menu option for "Install and Configure R"

5) Install R through EA

- Follow the normal process to install R from EA by clicking on the "Install R" button (see image below)

- Instead of downloading the installer for R the product will use the installer you copied into %TEMP%\sapvi\RUNR

- Once R is installed additional packages required by EA will be automatically download.

6) Wait for Success (smile)

If you get a dialog like below popping then the install has worked successfully, phew!

Purpose of document:

How to guide demonstrates the technical installation steps for AFL library in SAP HANA database version



For one of our requirement customer wanted to find the hidden trend of demand and supply for particular dealer against for particular material. As well as they want to forecast the trend of orders based on historical data.


Business Objective:

To increase business process efficiency by using SAP HANA in-memory technology


Technical Environment:

Existing SAP HANA hosted in AWS having version SAP HANA 1.0.82 (SPS08) and installation of SAP AFL version 82 revision. SAP HANA developer has created views based on business requirement and consumed it into SAP PAL. We have implemented single exponential smoothing algorithm in SAP PAL.



To use the PAL functions, you must:

  • Install SAP HANA SPS xx.
  • Install the Application Function Library (AFL), which includes the PAL.
  • Enable the Script Server in HANA instance. See SAP Note 1650957 for further information
  • The revision of the AFL must match the revision of SAP HANA

Checking PAL Installation To confirm that the PAL functions were installed successfully,

check the following three public views:

● sys.afl_areas

● sys.afl_packages

● sys.afl_functions

These views are granted to the PUBLIC role and can be accessed by anyone

PFB Installation step by step. Happy Reading!

1.Checking current SAP HANA Version on AWS
a) HANA version check from Command Line:
->Login to OS level as user "SIDadm"
->Run the command "HDB version"
b) HANA version check from HANA Studio:
->Login to Studio and check the "Version History" as below
->HANA Studio -> HANA system -> Right Click -> properties -> Version History.

Output: (Which means we are on SAP HANA 1.0, Version 82)

2. Downloading required corresponding patch level for AFL

  • We need to download version 82 patch level from SWDC as below:2.JPG
  • Download SAPCAR from SWDC

3. Transfer downloaded media on to JUMP off rdp(server)


4. Copy Downloaded files from JUMP off server to HDB to /hana/shared/HDB/HDB00 using FileZilla as below.


(Note: Drag & drop selecting location from Jump off to HDB (Remote Site))          


Installation Phase

  • Login to HANA Server using HDBADM as user & xxxx as password using Putty.
  • Uncar the files using SAPCAR –xvf IMDB_AFL100_82_3-10012328.SAR in location /usr/sap/HDB/HDB00





Files Uncarred as above.

  • Login using root into HANA Database for Installation of AFL.


  • Provide appropriate rwx 777 permissions to SAP_HANA_AFL created using command

chmod –R 777 SAP_HANA_AFL as shown below


  • Execute ./hdbinst for SAP AFL Installation


Installation Done!!!

Add AFL Roles to user profile for required users to use & verify afl schema in place.



We faced issues wherein we didn’t find the AFL Area views.

Analysis: AFL Lib version installed is of version 85.

Resolution : AFL Lib version should match the SAP HANA DB version which is 82.



(3/17/2015: Article updated with links to related blogs worth checking out for more information)


Predictive Analytics 2.0 has so many new things in it that my original article (Introducing SAP Predictive Analytics 2.0!) was not able to go through details for the SAP Automated Predictive Library (APL) – a major milestone in our efforts to integrate and embed our advanced analytics services everywhere and into everything.


The SAP APL is a native C++ implementation of the automated predictive capabilities of SAP InfiniteInsight running directly in SAP HANA.  Now, for the first time, you can run our patented automated predictive algorithms on your data stored in SAP HANA without first requiring an expensive and time consuming data extraction process.   This also opens up an entirely new area of use cases – such as on-the-fly, in-database scoring for predictions, classifications, and clustering scenarios.


Augmenting SAP HANA's Predictive Capabilities


When I talk to people about the APL, the first question I usually get is, “I thought HANA already had native predictive capabilities?”.  The answer of course is yes, in the form of the SAP Predictive Analytics Library (SAP PAL).  The SAP PAL is also a HANA-native implementation of algorithms, but these are more suited to data scientists who have a data mining background and need more explicit modelling of the analytical workflow.


gear-7.pngThe key differentiator for the SAP APL is the “A” for “automated”.  The APL does not take in a complex predictive model as an input – it simply needs to be set up and be told what type of data mining function needs to be applied to the data.  From there the APL takes over by composing its own models, creating and selectively eliminating metadata as required, and ultimately coming up with the most optimal model given the data you provided – in a mostly automated way.  This means customers, developers, and partners do not need to be data scientists to use the SAP APL – they simply need to feed the APL what they have and tell it what they need.


When you combine "automated" with "all calculations done in HANA without requiring data extraction", you end up with a pretty incredible solution that can enable you to do things that simply were not possible before.  All other solutions either require data extraction or do "in-database scoring" by using a fixed model.  The SAP APL is unique in that it can be self-tuning while still providing "in-database" scoring on the fly.


(By the way, I should also mention that SAP HANA has even more predictive capabilities than I am discussing here – more notably it’s support for the open-source “R” library.  While this does require an off-board “R” Server and involves data transfer outside of HANA, it opens HANA up to the over 5,000 open source algorithms that are out there.  Even better, SAP Predictive Analytics 2.0’s “Expert Analytics” mode also uses “R” and seamlessly works with HANA’s use of the “R” server to provide a complete end-to-end advanced analytics solution for the data scientist.)


Overview of SAP Automated Predictive Library (APL)


The SAP APL is installed as a library inside the HANA AFL (Application Function Library).   The following diagram gives an overview of where it fits in:


Blog - SAP APL Arch.png


The APL is accessibly by many ways: You can access the APL by calling the functions from SQL scripts or from the Application Functional Modeler (AFM) within HANA Studio.  Desktop users can also access the APL by using SAP Predictive Analytics 2.0 in both the “Automated” and “Expert” modes.  Finally, applications built directly on SAP HANA can embed APL functionality without exposing any complexity to the user.  Since the APL is new as of February 11th, currently only SAP applications use it, but the APL is open for use by any application sitting on SAP HANA.


In this first release, the APL has five classes of capabilities:


  • Classification: To predict a binary answer – i.e. Is this transaction fraudulent or not?
  • Regression: To predict or score an amount that is a non-binary value - i.e. Determining the insurance risk factor this this driver.
  • Clustering: To find groups in your dataset – i.e. Who are all the people likely to buy my product today?
  • Time Series: To predict future values based on previously observed values – How likely are flight cancellations in winter vs. summer months?
  • Key Influencers: To find other attributes that are impacting a particular dimension – i.e. What are indicators in my data of future equipment failure?


Here is an example of using the APL within SAP Predictive Analytics 2.0’s “Expert Analytics” mode:


Blog - SAP APL - Expert.png


As you can see, the APL algorithms are easily recognizable by their “HANA Auto-“ prefix.   It is also interesting to note that within Expert Analytics, you can chain together algorithms of different types – for example, you could start with Auto Classification and then run separate “R” or PAL algorithms on each of the individual clusters by chaining them to the APL’s output.


If you are using SAP’s Hybris Marketing, SAP loud for Customer, or SAP Fraud Management, you are likely already using the SAP APL - that's how seamless and easy it is to get advanced analytical capabilites to the end user.


How To Get Started With SAP APL


You can get started NOW. The SAP Automated Predictive Library (APL) is a HANA-native component and therefore of course you need SAP HANA – currently SP09 is supported.   Provided you are properly licensed for it, you can find it at: https://support.sap.com/software/patches/a-z-index.html




Note: If you do not see it at the link above, you likely are not licensed for it - contact your SAP representative who can discuss licensing and trial options for you. Chances are there's a way you can try it - as long as you already have SAP HANA installed.


The SAP APL Reference Guide that covers installation is at: https://websmp207.sap-ag.de/~sapidb/012002523100002180172015E/apl11_apl_user_guide_en.pdf


UPDATE 3/4/2015: Here's a great blog entry I missed adding in this original post (How to Install the Automated Predictive Library in SAP HANA) by Ian Henry that covers how to get APL installed.


UPDATE 3/17/2015: Here's an excellent blog (Introducing the SAP Automated Predictive Library ) by Philip MUGGLESTONE on the SAP APL and it also includes hands-on videos from the SAP HANA Academy!


(If you want to get access to these automated capabilities but do not have SAP HANA, you still can!  SAP Predictive Analytics 2.0 already implements these algorithms and has no HANA dependencies) – The current trial of the desktop client is the previous version (but still has all the automated functionalities). We will be announcing a new PA 2.0 Trial Program soon within the next week or two!


What's Next for SAP APL


As my previous article stated, this is just the beginning of a journey for SAP Predictive Analytics 2.x – and we have big plans for the SAP APL as well.  We are working on creating recommendation services, tighter integration into our other predictive offerings, and even bringing these HANA-native services to the grand-daddy of all HANA’s – the SAP HANA Cloud Platform (HCP).


Ensure you are bookmarking and rating articles you like and keep checking the SAP Predictive Analytics SCN community for all the latest. (Hint: Setting email alerts will notify you when something new gets posted).


(p.s. An extra special thanks to Marc DANIAU and team for driving the APL development and providing much of the material for this article.)

SAP PA 2.pngOn February 11th, we formally released the next major version of our advanced analytics product – SAP Predictive Analytics 2.0.   This is a big release for us because it not only includes many customer-driven features, but it also finally brings our two predictive analysis tools together into a single solution:


SAP Predictive Analysis 1.x:


  • SAP’s advanced analytics solution aimed at advanced business analysts and data scientists to analyze and visualize their data using powerful predictive algorithms, the “R” open-source statistical analysis language, and in-memory data mining capabilities.  “SAP PA 1.x” is built upon the SAP Lumira codebase which also gives it excellent advanced visualization and data discovery capabilities as well.


SAP InfiniteInsight 7.x:


  • SAP’s automated data preparation, predictive modeling, and scoring solution that allows business users to easily and quickly find meaning in their data without requiring the skills of a data scientist.  “SAP II 7.x” is at the forefront of automated predictive analysis and includes the product set from SAP’s acquisition of KXEN in 2013.


Why Did We Have Two Products In The First Place?


Recognizing the natural evolution of business intelligence going from answering “what happened?” to the much more interesting “why did it happen?”, SAP created a new advanced analysis product in 2012 – SAP Predictive Analysis.  This product was aimed at the data analysts and data scientists who until then had little choice but to develop modelling scripts and algorithms by hand and then apply algorithms to their data manually.  SAP Predictive Analysis 1.x enabled users to analyze and visualize their data using pre-built algorithms from the open-source “R” library and graphically “chain” these modules together to perform complex analysis without a technically challenging and tedious manual modelling process.


Then in 2013, SAP acquired KXEN – which made a product called InfiniteInsight that enabled business users to automatically analyze their data without manual modelling or even requiring the skills of a data scientist or statistician.  SAP InfiniteInsight 7.x contains its own intelligent and self-tuning algorithms that encapsulate much of the manual preparation and modelling work a data scientist would typically do so business users can focus on answering their business problems instead of deciding which algorithm to use and when.



Predictive Analytics 2.0 Bridges Two Worlds



SAP Predictive Analytics 2.0 brings these two products together into a single installable solution and contains the functionality and experiences of both products.  But just to make things interesting, we have also changed the product name slightly – the unified solution is now called “SAP Predictive Analytics” and not “SAP Predictive Analysis”.


When we set out to create a unified Predictive Analytics 2.0, we set out to balance three important factors:


UX Consistency: Existing customers upgrading to PA 2.0 need a high level of UX consistency to mitigate any disruption from the unification process.  Therefore in PA 2.0:

    • We’ve preserved the previous PA 1.x experience and renamed it as “Expert Analytics”.
    • We’ve preserved the previous II 7.x experience and renamed it as “Automated Analytics”.


Users upgrading to PA 2.0 should feel right at home with whichever mode they have used before but now have a second set of capabilities they may not have had exposure to before.


UX Progression: While we preserved the traditional experience of both products, we are committed to bringing these together into a “next generation” experience that not only melds the “data scientist” and “business analyst” workflows together, but also makes them interoperable.  PA 2.0 provides the foundation for this with a unified installer and users will see incremental changes in PA 2.1 and PA 2.2 rather than a wholesale change to a foreign interface.


Feature Progression: PA 2.0 introduces significant new features that truly warrant a “2.0” label and as you’ll see below, there’s something for everyone: BW user? Check. HANA customer? Check. Big Data person? Check. Hardcore data scientist? Check.


We believe this strategy properly balances the need for providing highly demanded new functionality in the existing products while creating a non-disruptive roadmap to a new product with a next generation experience that provides even stronger “automated” and “expert” capabilities than the current II 7.x and PA 1.x products offer.


New in SAP Predictive Analytics 2.0


Here’s a high level summary of the more notable advances in PA 2.0:


Expert Analytics (Formerly Predictive Analysis 1.x):





Automated Analytics (Formerly InfiniteInsight 7.x):


  • Apache Spark support: Automated Analytics now supports the Apache Spark framework in order to perform large scale data processing.  The currently supported version of Spark is 1.1.0.
  • SAP Automated Predictive Library (APL) support:  You can now automatically generate models within HANA using SAP APL algorithms such as HANA Auto Classification, HANA Auto Clustering, and HANA Auto Regression that execute natively in SAP HANA without requiring data extraction. Again, more information here:


You can read more about these and other features of PA 2.0 in this doc: http://help.sap.com/businessobject/product_guides/pa20/en/pa20_whatsnew_en.pdf


How To Get Started?


We have a very comprehensive list of official product tutorials covering most (old and new) functionality:

Official Product Tutorials – SAP Predictive Analytics, SAP Predictive Analysis and SAP InfiniteInsight



Just The First Step On A Journey


beginning.jpgLike any journey, there’s going to be a few steps along the way.   We plan to deliver Predictive Analytics 2.1 in Q2 and you’ll see all the progress we’ve made at this year’s SAPPHIRE conference in May.   There’s a lot going on in PA 2.1: improvements in R management for data scientists, predictive model management, and support for ultra-wide datasets are just a few highlights.  The convergence theme will also continue in PA 2.1 and beyond as we get closer and closer to unveiling a next generation user experience optimized for predictive analysis workflows across both the data scientist and business analyst personas.


However PA 2.x on the desktop is only part of the story – we will also be offering advanced analytics services on SAP HANA Cloud Platform (HCP) for anyone to make their applications smarter and you’ll see even more integration of our next generation capabilities directly in other products like SAP Lumira, SAP Cloud for Planning, and Hybris Marketing.





As you can see, 2015 is going to be a BIG year for SAP Predictive Analytics.  To keep up to date with the latest news, product updates, and discussions, make sure you are visiting the Predictive SCN Community here: SAP Predictive Analytics   If you have not already done so, now is a good time to set up alerts so that you are automatically alerted when something gets posted.  Simply go to http://scn.sap.com/community/predictive-analysis and once you are logged in, select “Start email notifications” on the right hand “actions” menu.

SAP Predictive Analytics is a tool that offers predictive capabilities to analyze data from various sources and apply predictive algorithms to get insights from the data. The functionality is enriched with the integration of R Language. SAP Predictive Analytics and R together gives a very good pitch for the game.


The tool can take data directly from various resources, including SAP HANA, SAP BI/BW systems; and with the HANA PAL (Predictive Analysis Library) functions, we can do better analysis of the data and predict more precisely. The business use cases where these algorithms can be applied keeps increasing day by day. and one such situation is that when we want to export the data ( predicted values ) out of the tool.


In this blog, we will be taking a business use case to export content from SAP Predictive Analytics to an external database( in our case, it will be a MySQL database). The blog will cover only the system connection parameters, we do not discuss about the algorithms or the data here.


SAP Predictive Analytics Version: 2.0.0


Step 1: Check if the database driver is available


To connect to the external system, we need the respective database driver to be installed in your installation of SAP Predictive Analytics.

Follow the steps to see if the respective database driver is installed in your system.

From the home screen : File -> Preferences ( You also use Ctrl+P)

From the preferences menu, select the SQL Drivers menu and scroll down to the ORACLE category, where you can find the MySQL5 - JDBC driver option available. The icon will be green, if the driver is already available, else click on the "Install Drivers" button on the top right corner of the window.


You need to manually download the driver (mysql-connector-java-5.1.13-bin.jar)

Use your Oracle ID to download the original version of the driver, use "Install Driver" button to install the driver.

You may have to restart the SAP Predictive Analysis application.


Once you have restarted, you can navigate back to the preferences tab to see if the driver is properly installed.











Step 2: Use Data Writer

Now that we have the JDBC driver installed, SAP Predictive Analytics can now detect and communicate to any MySQL database.

Lets move on to the "designer view" of the "Predict" tab in the tool. Here click on the Data Writer category on the right side; select the JDBC driver from the database writers option.


"Predict" tab -> Data Writers -> Database Writers -> JDBC Writer.


db writer.png


Double click on the icon to configure the settings.


In the configure settings tab, we need to key in the following details.


jdbc writer.png



Database Type: It is MySQL in our case (You will get a drop down menu here)

Database Driver Path : Refer to the file location where you have stored the driver that was downloaded earlier.

Port Number: The port number allotted by the system administrator for this communication (for example here it is port 3306).

Database Name: You must specify the name of the database where the data must be stored.

Username & Password: Make sure that the username has access to the database and has privileges to create a table and store entries in it.


Table Name: You need to specify the Table Name - SAP Predictive Analysis will create a table with this name in the database provided by earlier.

If the task is going to be a repetitive one, you can select the "Overwrite, if exists" check-box. This is very much helpful to update the table with the latest predicted results.

Once this is done, you can run your analysis, and check the MySQL database to see if the results are exported there.

The same methodology can be applied to any database that is supported by SAP Predictive Analysis Tool.


This is the result that was automatically exported to MySQL by SAP Predictive Analytics for the R-Apriori algorithm that was used in the sample run.



Let me know your queries in the comments section.

Thank you.

- Tamilnesan G


With an ever evolving and growing HANA Platform the Predictive Analytics (PA), Expert Analytics team have a tough job keeping up with all the new algorithms being added to the Predictive Algorithm Library (PAL). That's not to say that new algorithms won't be added in eventually. The current focus has been on including the Automated Predictive Library (APL). From PA 2.0 onwards these are available in both HANA and non-HANA modes.


To provide a more complete offering the PA development team have now added the ability to add your own custom HANA components inside Predictive Analytics.  What this really means if there's a HANA PAL function that you want to take advantage of that Expert Analytics does not have an out of the box node for we can quickly and easily add one without being a developer.


So for example I have been doing some basket analysis with Apriori and now wish to investigate the other association analysis methods in the HANA PAL I can find the appropriate algorithm, FP-Growth  and include it within PA 2.0.

Let's open up Expert Analytics as its now called as part of Predictive Analytics 2.0

Expert Analytics.png


Here I've connected to a HANA SP9 source



You will now see the additional components you can add, select PAL Component

Add PAL Componet.png


Enter the Component Name that you want to use


Component Name v2.png


Here you can see all the available PAL Functions that have been surfaced with PA 2.0

Create Componet.png


I chose FPGROWTH as I'm looking to do some more Basket Analysis.  Expert Analytics then knows the parameters that the PAL function requires.

You can then adjust the names and default values as required.



When you press Finish you will see the new Component available in the Algorithms section, with an "N" for new.



You can now use that on the canvas just like all the other components.

Add FP-Growth.png


You will now see the parameters exactly as you created the component in the previous steps.

Component Properties v2.png

That's it you can now run the workflow, and you can re-use the custom component whenever you need it.

Shiny App offers a way to create interactive data analysis applications using R scripts. This blog post will show how to use this interactive analysis capability in SAP Predictive Analytics. In general we utilize a custom R component to hold the Shiny App so it can be added into PA analysis chain. There are steps required to tweak a normal shiny app to become compliant with PA's requirements on custom R scripts. The remainderof this blog post will show this in more details. Before diving deeper into this topic, let's have a sneak peak of the final interactive shiny app:







Install shiny app:




Add ShinyApp as PA Custom R Component:


(1) Create a custom R component and give it a name. Here we use "shinyapp_mtcars".




(2) Add PA compliant shiny app code to the script editor. Normally a shiny app splits its code into two R script files: data analysis logics and plotting logics in server.R, and the ui design in ui.R. Here we need to squeeze server.R and ui.R into one primary function as required by PA. Luckily, shiny app provides a way to define both in runApp. The structure of a PA-compatile shiny app looks like this:


showshiny <- function(mydata){
          ui = fluidPage(
               # UI design code
          server = function(input, output, session){
              # data analysis logics and plotting logics

The parameter mydata is the data frame output from the previous component in the analysis chain. Normally the shinyServer function does not require the third parameter session. But in our case, it is important to have it as this parameter makes sure the shiny app correctly exits when the browser window holding the app is closed. So make sure the session$onSessionEnded function is correctly set up. Make sure the other configurations are also correctly set:




(3) Click Next -> Finish to finish the addition of this custom R component. Now you should be able to see it in the side algorithm panel.



Run PA analysis with a Shiny App component


Using shiny app in PA analysis chain is no different from using a normal custom R component in the analysis chain. In the example shown in this blog post, I use a chain consisting of two analysis nodes: an out-of-box R-Kmeans component and a Shiny App component.




Run the chain and a browser window will pop up containing the Shiny App. Change the value of the scroll bar on the left panel and you will be able to see the plots on the right are also updated. Closing the browser window will return back to PA.




Now we have a close look into this Shiny App. The dataset used here is mtcars. It is loaded into PA as an offline dataset. This analysis chain firstly uses a R-K-Means component to cluster the dataset into three clusters according to features including cylinders, horse power, and weight. Then the shiny app component comes into play for interactive data analysis of the clustered dataset. Basically it does three things: (1) according to the ratio as specified in the slider, it samples the clustered dataset; (2) for data in the sample set, it draws a histogram according to which cluster a car belongs to and plots it (3) for data the in sample set, it fits a linear model to represent the correlation between weight and horse power, then plot the training set and the model. This analysis is only a toy application but I hope this could spark more use cases of practical uses.


Note that to re-run the analysis chain one must update components in the analysis chain first. This could be to remove and add back in the Shiny App component. It can also be changing and changing back the configuration of the K-means component.


Please contact me if you are interested in further discussion on this topic. Source code of the Shiny custom R component used in this blog post is available on request.

Attending BI2015 in Las Vegas from March 9-12? Predictive Analytics is part of Track 4:Self Service and Predictive Analytics. Don't have time to see all these sessions?

Here are 7 predictive sessions you should include in your schedule:



Best practices from The Irvine Company for deploying and optimizing SAP Predictive Analysis

Ken Wong, The Irvine Company
Tuesday, March 10, 2015
8:30 AM - 9:45 AM

Attend this session for insight into how The Irvine Company enhanced its BI strategy to include predictive analytics capabilities. Come away with firsthand lessons from the company to help you determine the business scenarios in which predictive analytics can provide the greatest value, and get lessons on ...More »


SAP Predictive Analytics: Latest updates, future roadmap, and live demo

Chandran Saravana, SAP
Monday, March 09, 2015
5:00 PM - 6:15 PM


Attend this session to explore the fundamentals of SAP Predictive Analytics, and find out how data scientist, business analyst and business users can leverage it for greater visibility into trends, risks, and opportunities. You will learn how to ...More »


Predictive analytics tools in SAP HANA: What tools are available, and when should I use them?

Hillary Bliss, Decision First Technologies
Tuesday, March 10, 2015
1:00 PM - 2:15 PM


Gain an understanding of the tools that run predictive algorithms within SAP HANA, including SAP Predictive Analysis, the predictive analysis libraries, SAP HANA-R Integration, SAP InfiniteInsight, and the SAP HANA application function modeler. Suited to both administrators and predictive users, in this session you will ...More »


Leveraging SAP HANA embedded advanced analytics for predictive, text, and spatial analysis in real time

Neil McGovern, SAP
Tuesday, March 10, 2015
8:30 AM - 9:45 AM


Find out how embedded advanced analytics with SAP HANA allows you to identify, combine, and manage multiple sources of data and build advanced analytics models within your business applications to drive business impact. Understand how to ...More »


Advanced analytics for the non-data scientist: What you really need to know

Ashish C. Morzaria, SAP
Tuesday, March 10, 2015
5:00 PM - 6:15 PM


“Advanced Analytics” doesn’t mean you need to be a data scientist to use complex algorithms to unlock the secrets of your data and improve the way you do BI. This session focuses on techniques for preparing data, choosing the right algorithms and building analytical models from scratch, including ...More »


A technical guide to leveraging advanced analytics capabilities from SAP

Charles Gadalla, SAP
Tuesday, March 10, 2015
10:30 AM - 11:45 AM


With an emphasis on use case examples, this session examines how to exploit SAP's advanced analytics solutions for big data and their associated algorithms to drive business impact. Attend to ...More »


Harnessing the power of big data to drive business transformation

Thursday, March 12, 2015
10:00 AM - 11:15 AM


This session explores how big data shapes technology strategies and drives new business models and revenue streams for companies across all industries. Attend for insight into SAP's big data technology strategy and discuss...More »


Filter Blog

By author:
By date:
By tag: