RapidMiner Market Basket Sample

RapidMiner Market Basket

One method to create a targeted cross selling model is to use historical customer information and apply the prediction to existing customers.  In this example, I will be using fictitious customer account data for a financial institution such as a bank or credit union to create a RapidMiner Market Basket predictive model.  The Marketing department wants to send out targeted mailing and phone call campaigns to customers most likely to need an auto loan.  The available data includes information on each unique account along with flags that indicate use (1 used, 0 not used).  Other fields count the number of inbound calls, late payments, or number of months as a customer.

Sample Financial Data Fields

  1. Account ID                                       10. Holiday Club Indicator
  2. Account Origin Indicator                 11. Number of Late Payment
  3. Checking Indicator                           12. Auto Loan Indicator
  4. Saving Indicator                               13. Home Loan Indicator
  5. Credit Card Indicator                       14. ATM Usage
  6. Debit Card Indicator                        15. Drive Through Usage
  7. Number of Inbound Calls                16. Inside Counter Usage
  8. Tenure in Months                             17. Call Center Usage
  9. Vacation Club Indicator                    18. Multiple Location Usage

RapidMiner Studio Process

Create a new process and connect to the source data.  In this example, it is an Excel file.

Then add a Select Attributes operator and select the columns to use in the model.  I am selecting the following fields for this model.

  • ATM Usage, Auto Loan Indicator, Checking Indicator, Inside Counter Usage, Credit Card Usage, Debit Card Usage, Drive Through Usage, and Home Loan Indicator

Then add a FP-Growth operator to calculate the frequency of items purchased together.

Finally, add a Create Association Rules operator to generate the rules based on frequently purchased items.

The completed flow looks like this:

RapidMiner Market Basket

Market Basket Results

After running the model the association rules are displayed.  By sorting on the conviction column, I can see that Auto Loans are associated to customers that have Debit Cards and Home Loans.  In addition customers with Checking Accounts and Home Loans are candidates for Auto Loans.  An interesting find is also for customers with Debit Cards and Drive Through usage are targets auto loans.

Market Basket Outcome

To fulfill the Marketing Groups request, I can now query for all customers that fit the premises column.  I would also provide the information on which of these customers currently have an auto loan and which ones do not have an auto loan.  Marketing can then create campaigns and track the auto loan increase to this targeted list versus normal channels.

If you would like the sample process and data file please contact me.