Adding predictive analytics to your business rules
If you have read my book Smart (Enough) Systems or are a regular reader of my blog posts (here or on my main blog JTonEDM) then you will know that not only do I believe that business rules and business rules management systems like BRFplus and NetWeaver BRM are better ways to manage decision-making logic, I also believe that they should be integrated with predictive analytics.
The reasons for this are two fold. Firstly I see lots of decisions where companies and organizations have policies and regulations that control a decision but who also have lots of historical data that should direct that decision in a specific direction: they have data about customer behavior that shows that a customer is a low risk or that a customer is likely to churn/cancel their subscription; they have data about a price that it will be too high for this prospect; they have data about a route that implies a delivery will be late and so on.
Secondly the evidence that predictive analytics add more value when applied to operational, transactional decisions is strong. Using business rules to make predictive analytic models actionable in this kind of operational context is proven and effective.
One of the challenges in using predictive analytics and business rules together is that the development of predictive models typically takes place in an offline, non-transactional environment. When the model is complete and validated it is handed off to some programmers to implement. This takes a long time and results in hard to change code, making future updates to the model (which will be required) more difficult. And if the team is not careful, the actions taken as a result of the model end being coded too, making them hard to change and making it difficult for the business to see how it is using the model. Business rules can and should be used to solve the second problem, but you will still be left with the first – how to turn the model that has been built into something that can be executed.
Enter PMML – the Predictive Model Markup Language. An XML format maintained independently of any vendor that describes models so they can be moved between tools and platforms. Crucially, this format allows models to be moved between development platforms like SAS or IBM SPSS and deployment platforms. Today the SAP business rules products do not support PMML but an SAP partner, Zementis, has a product to help you – ADAPA (reviewed here).
Here’s how it would work:
- You identify some operational decision you want to improve – identifying fraudulent claims, calculating risk-based prices, determing the best retention offer for a customer.
- You find the rules (policies, regulations, best practices) that apply and start to capture them in NetWeaver BRM or BRFplus depending on your deployment environment.
- An analyst uses SAS, IBM SPSS, R or some other analytic tool to analyze the data you have about what worked and did not work in the past – fraudulent claims,price/loss data, offer acceptance data – and they build a predictive model. This does something like calculate how likely it is that a claim is fraudulent how likely they are to churn or how likely a customer is to accept a particular offer.
- The model is exported as PMML and loaded up, using Zementis ADAPA, to the Amazon compute clould where it is available as a service
- You use ABAP or the Composition Environment to hook up the web service, so you can use the returned results (a score and some explanation of the score or reason codes typically) in rules. You can write rules that route claims to fraud if they are both large enough and risky enough to justify the expense, you can write rules to select the most appropriate retention offer given the offers available, restrictions based on customer/plan and the risk of the customer churning. And so on.
- Your operational systems and processes now have a decision-making service to call that applies your policies and best practices and is informed by your data, enabling it to make the best ecision possible.