This tutorial introduces you to the Associations mining
function. The sample data contains products of a retail bank per customer.
With the Associations mining function, you can explore product affinities,
for example, which product combinations occur together at the same
customer.
This tutorial shows how to use the Associations mining function
to analyze product affinities of a bank.
- Create a new data warehousing project:
- On the toolbar of the Design Studio, click the New icon.
- On the Select a wizard window, select and click Next.
- In the Project name field, type MiningTutorials and
click Finish.
- In the MiningTutorial project, create a new mining flow
for the associations analysis.
- Open the MiningTutorial project,
right-click the Mining Flows folder, and select .
The
New Data Flow window is opened.
- In the Name of the mining flow field,
type MarketBasketAnalysis and click Next.
- From the list of connections, select DWESAMP and click Finish.
The mining flow MarketBasketAnalysis is added to the
Mining Flows folder in the MiningTutorial project.
- Add operators from the Palette to the mining editor canvas:
Tip: To quickly locate the required
operator in the Palette, type the name of the operator in the Palette entry
field, for example, Table Source.
- Place the Table source operator
on the canvas.
The Select Database Table window
is opened.
- Expand the BANK schema, select the CUSTOMER_PRODUCTS
table, and click Finish.
In
this tutorial, the Db2® table
to be analyzed contains a list of products for each bank customer.
- In the Table source operator,
click the plus (+) icon to display the columns
of the table.
- Place the Associations operator
to the right of the Table source operator.
The Associations operator
finds product affinities.
- Connect the operators in the canvas by clicking the Output
Port of the Table Source operator and dragging the connection
to the Input Port of the Associations operator.
- Edit the Associations operator properties:
- In the canvas, select the Associations operator.
The Properties view of the Associations operator is displayed.
- On the Properties page, click Model Name.
- In the Model name field, type ProductAffinities as
model name for the new model.
- Click the Mining Settings tab.
- In the Group column list, select CLIENT_ID to
specify all products for one customer to represent one item set.
- Add a Visualizer operator
to the canvas to open a graphical view of the association rules:
- Place a Visualizer operator
on the canvas to the right of the Associations operator.
- Connect the operators on the canvas. From the Palette,
click Connection. Click the Association's Model port
and then click the Visualizer's Model port.
- Execute the mining flow in the database and analyze the
association rules to see the product affinities.
- Click the Execute Mining Flow icon
on the toolbar. The Execution of Flow window opens.
- Accept the default values and click Execute.
The Mining Flow Execution status window opens. Upon completion,
the Association Visualizer window opens with several views to display
the association rules. The Rules view is a tabular view that shows
one rule in each row with measures about the relevance and quality
of the rule.
- Click Graph to open the graphical
view. In the graphical view of our scenario, the different products
are represented as nodes and the associations between the products
are represented as arrows. Color and width of the rules show relevance
and quality of the rules as indicated in the legend below the graph.
- Close the association model.
- In the Data Output area, you see the status and action
of the execution process. In the Data Source Explorer, you see that
the mining model that was just visualized is stored in the RULES database.