It is known by the data science industry that creating ML models is relatively fast and easy, but putting them into production is difficult and expensive. You’d be surprised to find out that only a small percentage of ML projects go into production– only about 12% of them do. (source

This is why, after looking closely at what clients were building with Datagran’s pipelines, we determined that Rule Extraction was a step in the right direction to release some of the pain.

In essence, Rule extractions help companies connect their data, run an algorithm and automatically detect events to then send that output to business applications. One of the best use cases for this model is in the e-commerce industry. Let’s go over an example:

Rappi, a billion-dollar delivery App with more than 7 million users, wanted to understand why their users were abandoning their shopping cart after almost completing their order.

First, they integrated Datagran’s SDK to extract customer behavior from their IOs and Android App.

Then they chose an algorithm. Because rule extraction can be only applied to Classification or Regression models to extract a set of rules found within the model and the data belonging to each rule, they chose the Classification algorithm.

It is important to also note, that rule extraction works exclusively on Decision Tree Algorithms– they can be found in two types of models:

Once they run the algorithm, one of the findings was an event labeled as WARNING_MSG-> This event was making 70% of users drop off from their mobile App order.

https://assets.website-files.com/5d9bae2e31a6d3024b73a515/60acfda1d28b3fa2593c3999_600xufUKzIySsyODEMxORKau2K9ThsLJXPV1gfEVHyjjZJ-4CWVjR10zBzu9ayAPxiuHG4fgo8V3CCG9wAg1BQYJDg6YgT00nCOh3PMrkYTmb8PndJAkeTvcXe4Gi4pczD_1lmbd.png

This finding led the team to pinpoint the exact reason behind their customer drop-offs just before they were in their shopping cart, and enter their delivery address. The message warned users by displaying a pop-up asking them if they were sure the address was correct since it seems they were too far away from the restaurant.

Consequently, the team redesigned the warning pop-up so the message was not meant as a warning, but one more question throughout the checkout process.

It didn’t end there though, the team at Rappi used these predictions to allow the chatbot to offer alternatives and recommendations for users, in order to prevent churn.

Rule extraction can be extremely powerful and useful considering companies can build such pipelines in minutes, test and iterate without high complexities due to low-code platforms like Datagran. Teams without ML OPs can pursue such projects or teams with robust teams can now test and iterate before having to put resources to build complex pipelines.

Churn Tutorial using Rule Extraction

In this tutorial, you will predict the events that cause churn by using data from a Telecommunications company, using Rule Extraction you will extract data from their customer service logs.

  1. First, you have to create a new data Integration. Learn more about Integrations here. Then, you will build the Classification model by heading to Pipelines. Name your model and then drag and drop your integration by selecting it from the right-hand side menu and dragging it into the canvas.
  2. Process your data by dragging and dropping an SQL operator and connecting it to the integration. Hover over the element and click the edit icon to open the query canvas. Use the sample query below and replace the values. Once done, run the query and save the table. Once in the canvas, hover over the operator and press play.