What is the SAP Automated Predictive Library (APL) for SAP HANA?
(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.
The 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:
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 the “Expert” mode. 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:
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 BusinessObjects 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.)
how can i access to APL? I cant use my user name and passworwd from scn!
Hi Daniel: You access it from the downloads section of SAP Service Marketplace (http://service.sap.com) and you may need to use your S-number associated with your organization's SMP account. To use it in production you need the "Predictive Option for SAP HANA" licensed - you can also contact your Account Executive for access/test/trial in case you have any licensing questions. Also, since APL is HANA native, so HANA is ofcourse required .
What is the material code for this product and can it be sold via partners?