Customer Analytics with SAS Enterprise Miner Hands-on …...Open Customer Analytics RPM.xlsx from...
Transcript of Customer Analytics with SAS Enterprise Miner Hands-on …...Open Customer Analytics RPM.xlsx from...
Customer Analytics with SAS® Enterprise Miner
Hands-on Workshop
SAS Australia and New Zealand V1.1
2 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
1. An Introduction to Customer Analytics .......................................................................... 3
2. Predicting Outcomes for Targeted Decision Making ..................................................... 7
Demonstration: Who will take up a Personal Loan? .............................................................. 10
3. Segmenting the Database ............................................................................................. 28
Demonstration: What groups of customers are there? ........................................................... 30
1 An Introduction to Customer Analytics 3
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1. An Introduction to Customer Analytics
4 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
1 An Introduction to Customer Analytics 5
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2 Predicting Outcomes for Targeted Decision Making 7
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2. Predicting Outcomes for Targeted Decision Making
8 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2 Predicting Outcomes for Targeted Decision Making 9
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
10 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
Who will take up a Personal Loan?
1. Open Customer Analytics RPM.xlsx from D:\workshop\catour.
Before modelling, let’s first explore the data and understand the variables.
2 Predicting Outcomes for Targeted Decision Making 11
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
Exploring data with SAS in Microsoft Excel
2. From the SAS ribbon, click Tasks and navigate to Describe and select Characterize Data…
3. Click OK.
4. Click Next>.
5. Uncheck SAS Data Sets.
12 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
6. Click Next> then Finish.
7. Scroll through the output and answer these questions:
How many levels of Education are there?
What is the maximum for the variable “Cash” in this data set?
Personal _Loan_Flag is a binary variable. 1 indicates the customer has taken a loan, a 0
indicates the customer has not taken a loan. What percentage of customers have taken a loan?
2 Predicting Outcomes for Targeted Decision Making 13
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
Predicting Personal Loan take-up
8. Go back to Sheet1 where the data is.
9. From the SAS ribbon click Tasks then navigate to Data Mining and select Rapid Predictive
Modeler
10. Click OK.
14 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
11. In the Name panel, find Personal_Loan_Flag and drag the variable to Dependent variable.
12. On the left panel select Model, and click on the Intermediate Modeling method.
2 Predicting Outcomes for Targeted Decision Making 15
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
13. On the left panel select Report, and check all available Report options.
14. On the left panel select Options and uncheck Save Enterprise Miner project data and Score input
data set. A pre-created SAS Enterprise Miner project already exists for the rest of this workshop.
15. Click Run.
16 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
16. Scroll through the output in worksheet Rapid Predictive Modeler and answer these questions:
What percentage of customers have a personal loan?
How many nominal inputs are there?
What was the most important variable?
What is the roc index for validate?
Which was the selected model?
In the next section we will see the SAS Enterprise Miner project that was created by the Rapid
Predictive Modeler task.
2 Predicting Outcomes for Targeted Decision Making 17
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
Predicting Personal Loan take-up in SAS Enterprise Miner
17. Open the SAS Enterprise Miner interface by either double-clicking on the SAS Enterprise Miner
Client 13.2 icon on the desktop or select Start All Programs SAS SAS Enterprise Miner
Client 13.2.
The SAS Enterprise Miner logon window appears.
18 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
18. Select Log On.
Your user ID and password should be filled in for you. To access SAS Enterprise Miner,
click Log On.
19. Select Open Project….
2 Predicting Outcomes for Targeted Decision Making 19
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
20. Select the catour project and then click OK.
The following window appears:
20 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
21. To open the process flow that was just built by Rapid Predictive Modeler, expand Diagram in the
Project tree and double-click RM1 – Personal_Loan_Flag.
Navigate the diagram and view the results of some of the nodes. To open the results of each node, right-
click on the node and select Results.
2 Predicting Outcomes for Targeted Decision Making 21
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
22. Go to the far right of the process flow and open the results of the Model Comparison by right-
clicking the node and select Results…
Which model was chosen as the “best” model by the Model Comparison node?
22 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
23. View the results of the Decision Tree (2) node by right-clicking the node and selecting Results…
24. Maximise the tree panel in the top right corner.
What is the primary variable for differentiating those who will take-up the personal loan offer and those
who will not?
2 Predicting Outcomes for Targeted Decision Making 23
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
25. Add a Neural Network node from the Model tab at the top of the diagram. Drag the node to a blank
space on the diagram.
26. Connect the node from the Metadata node to the Model Comparison node. This can be done by
moving the mouse to the right side of the Metadata node until the pencil appears and then drag and
drop the pencil to the Neural Network node and repeat from the Neural Network node to the Model
Comparison node.
24 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
27. Click on the Model Comparison node, and change the Selection Statistic to Average Squared
Error.
28. To run all unexecuted nodes prior to the Model Comparison node and update results based on
changes, right-click the Model Comparison node and select Run. Select Yes in the pop-up window.
Note that the nodes run concurrently.
2 Predicting Outcomes for Targeted Decision Making 25
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
29. Click Results when the node finishes running.
Which model is now chosen as the “best” model by the Model Comparison node?
30. Expand Data Sources in the project tree and drag BANK_CREDITCARDS_Score to a blank area
on the right of the diagram. This is another table of similar structure that will be scored against the
best model. “Scoring” is the process by which the modelling logic is applied to data (the population
or new data) to derive prediction scores.
26 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
31. Connect the score data to the Score node.
32. Right-click the Score node and select Run then Yes.
33. Click OK.
34. With the Score node selected in the diagram, click the ellipsis next to Exported Data in the Properties
panel.
2 Predicting Outcomes for Targeted Decision Making 27
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
35. Select the Score data, and click Browse.
What new variables are created by the scoring process?
28 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
3. Segmenting the Database
3 Segmenting the Database 29
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
30 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
What groups of customers are there?
36. Create a new diagram by right-clicking on diagram and select Create Diagram.
37. Enter “Segmentation” as the diagram name, and press OK
3 Segmenting the Database 31
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
38. Select BANK_CREDITCARDS_SEGMENTATION from Data Sources and drag this to the
Segmentation diagram. This data has fewer variables than the previous tables.
39. Right-click the data node in the diagram and select Edit Variables…
32 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
40. Use the CTRL or SHIFT key to select all available variables and click Explore…
3 Segmenting the Database 33
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
41. In the PERSONAL_LOAN_FLAG chart, click the bar with value 1 – those with a positive outcome –
and view the brush effect across the other charts.
There seems to be a relationship between whether a customer takes up a personal loan and some
demographic attributes.
42. Drag the Transform Variables node from the Modify tab to the diagram and connect it to the data
node.
34 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
43. With the Transform Variables node selected, go to the Properties panel on the left and change the
following properties:
Interval Inputs to Maximum Normal. This technique automatically determines the best
transformation to normalize continuous input variables.
Hide under Score to No.
44. Drag a Cluster node from the Explore tab to the diagram and connect it to the Transform Variables
node.
3 Segmenting the Database 35
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
45. With the Cluster node selected, go to the Properties panel on the left and options under Number of
Clusters and change the following:
Specification Method to User Specify.
Maximum Number of Clusters to 5.
46. Run the Cluster node.
36 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
47. Click Results...
5 clusters are created. Clusters 4 and 5 are the largest and cluster 2 is the smallest. Statistics for each
cluster can be seen in Mean Statistics.
48. Maximise the Segment Plot. This gives a profile of each cluster by each input variable.
3 Segmenting the Database 37
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
49. Drag a Segment Profile node from the Assess tab to the diagram and connect it to the Cluster node.
This is an alternative way of profiling clusters using the same inputs or different inputs.
50. With the Segment Profile node selected, go to the Properties panel on the left and change the
following properties:
Number of midpoints to 16.
Analysis Role under Target Variables to Report.
38 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
51. To profile with the original variables rather than the transformed variables, right-click the Segment
Profile node and select Edit Variables…
52. Change the value of Use for variables with prefix SQRT to No.
53. Change the value of Use for the original variables to Yes.
3 Segmenting the Database 39
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
54. Run the Segment Profile node and click Results…
55. Maximise the Profile: _SEGMENT_ window.
Each row represents a cluster from largest at the top to smallest at the bottom.
40 Customer Analytics with SAS® Enterprise Miner Hands-on Workshop
Copyright © 2015, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
The sections from left to right describe the most important variables to differentiate each cluster in
descending order. Example, Number of children is the most important variables to describe Segment 5
followed by gender, etc. For interval variables, the red outline is population distribution and the blue bars
are the segment distribution. For categorical variables, the inner pie chart is the population breakdown
and the outer ring is the segment breakdown.
56. Answer these questions:
What type of customers are in Segment 5?
What type of customers are in Segment 4?
Between Segments 4 and 5, which one is more likely to respond to a Personal Loan offer?
What segment is the least likely to respond to a Personal Loan offer?