16
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 1 Data Mining: Association Analysis Applies to: SAP BI 7.0. For more information, visit the EDW homepage Summary This article deals with Data Mining and it explains the classification method „Association Analysis‟ in detail. It also explains the steps for implementation of Association by creating a Model and an Analysis Process. Author: Vishall Pradeep K.S Company: Applexus Technologies (P) Ltd Created on: 5 May 2011 Author Bio Vishall Pradeep is working as SAP Technology Consultant with Applexus Technologies (P) Ltd. He has experience in SAP ABAP and SAP BI

Data Mining - Association Analysis

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Data Mining - Association Analysis

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 1

Data Mining: Association Analysis

Applies to:

SAP BI 7.0. For more information, visit the EDW homepage

Summary

This article deals with Data Mining and it explains the classification method „Association Analysis‟ in detail. It also explains the steps for implementation of Association by creating a Model and an Analysis Process.

Author: Vishall Pradeep K.S

Company: Applexus Technologies (P) Ltd

Created on: 5 May 2011

Author Bio

Vishall Pradeep is working as SAP Technology Consultant with Applexus Technologies (P) Ltd. He has experience in SAP ABAP and SAP BI

Page 2: Data Mining - Association Analysis

Data Mining: Association Analysis

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 2

Table of Contents

Introduction ......................................................................................................................................................... 3

Association Analysis ....................................................................................................................................... 3

Creating a Model ............................................................................................................................................. 3

Creating a Analysis Process for Training ........................................................................................................ 6

Maintaining DataSource for Association Rules ............................................................................................. 13

Related Content ................................................................................................................................................ 15

Disclaimer and Liability Notice .......................................................................................................................... 16

Page 3: Data Mining - Association Analysis

Data Mining: Association Analysis

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 3

Introduction

Data mining is to automatically determine significant patterns and hidden associations from large amounts of data. Data mining provides you with insights and correlations that had formerly gone unrecognized or been ignored because it had not been considered possible to analyze them. The data mining methods available in SAP BW allow you to create models according to your requirements and then use these models to draw information from your SAP BW data to assist your decision-making.

Association Analysis

Association analysis uncovers hidden patterns, correlations or casual structures among a set of items or objects. For example, association analysis enables you to understand what products and services customers tend to purchase at the same time. By analyzing the purchasing trends of your customers with association analysis, you can predict their future behavior. The purpose of association analysis is to find patterns in particular in business processes and to formulate suitable rules. Association analysis determines these rules by using historic data to train the model. You can display and export the determined association rules.

Creating a Model

Go to Transaction RSDMWB (Data Mining Workbench)

Data Mining->Expand Association Analysis->Right Click Association Analysis->Create Model

Page 4: Data Mining - Association Analysis

Data Mining: Association Analysis

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 4

Choose the Model Name and Description

The method name for which you are creating a model is displayed. You have three options for model field selection

To create the model fields manually, select the Manual option.

If you want to create a model that is similar to an existing model created previously, you can copy it choosing the Use Model as Template option. You can make minor changes to the copied version manually to suit your requirements

To create a model from a query, choose Model Field Selection and select the query which you want use as a source for model fields .The InfoObjects contained in the selected query are available as model fields

Page 5: Data Mining - Association Analysis

Data Mining: Association Analysis

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 5

The screen shows the list of Fields and we can select and exclude fields in it

In the Fields tab, to specify which characteristic is to be considered with which attributes and field parameters are used to specify weightings for the individual attributes. The system then establishes formerly unknown associations between the attribute values

Page 6: Data Mining - Association Analysis

Data Mining: Association Analysis

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 6

Model Fields tab is used to specify which transactions and which items should be considered

Model Parameters tab is used to specify what percentage of the transactions with the leading item should also contain the dependent item to define a valid rule (confidence). Coupled with this, you can use the parameters Lift and Support to improve the quality of the determined rules. Moreover, you can specify the number of leading and dependent items

Support -> Percentage of all the transactions that contain the item set.

Confidence ->Percentage of the transactions containing the leading items that also contain the depending items

Lift -> Confidence divided by support of the depending product and Lift helps to identify and eliminate rules that are only generated because some of the items naturally occur very frequently, although there is no actual association between the set of leading and depending items

Save and Activate the Model (we can only train or valuate a model or use it for the prediction if the model has been activated.)

Creating a Analysis Process for Training

We can create an analysis process for a data mining method to train a data mining model. The purpose of training a model using historic data is to allow the model to learn from the historic data. The training result can then be used for a prediction or in the operational system

Go to Transaction RSANWB (Analysis Process Designer)

Page 7: Data Mining - Association Analysis

Data Mining: Association Analysis

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 7

Choose General->Right Click->Create

Give the description to the APD

From the Data Sources, drag and drop the Query to the work area

Page 8: Data Mining - Association Analysis

Data Mining: Association Analysis

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 8

It asks for a Popup and click on Choose Query

From the Help, Select the query

And Click “OK”

Page 9: Data Mining - Association Analysis

Data Mining: Association Analysis

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 9

The Query which is the data Source is added as below

For the data target, drag the icon for the relevant data mining method in the work area

Double click on data mining node to make the settings in the dialog box that appears

Choose the required model from F4 Help

Page 10: Data Mining - Association Analysis

Data Mining: Association Analysis

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 10

Click on “ENTER” and Connect the two nodes

To make an explicit field assignment, double click on the data flow arrow that connects the nodes

Click on Automatic Assignment and choose Same Infoobject

Page 11: Data Mining - Association Analysis

Data Mining: Association Analysis

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 11

Click on Continue and Save and activate the APD

While saving it will ask for a Technical Name

Execute the APD

The data is written to the data target and a log is displayed

To view the training results, in the context menu of data target, choose Data Mining Model View Model Results

Page 12: Data Mining - Association Analysis

Data Mining: Association Analysis

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 12

It will ask for a Popup and we can restrict values according to leading and depending items and choose “Execute”.

The Results will be shown as below

Page 13: Data Mining - Association Analysis

Data Mining: Association Analysis

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 13

Maintaining DataSource for Association Rules

We can use the extraction process to load the results from mining models using DataSources

The generation of DataSources is based on the InfoObjects that are used as model keys. Hence, any two models having the same keys will share the same DataSource

The extraction process takes into account the results that have already been uploaded into SAP BW. Using the SAP BW staging process, we can upload the extracted data obtained from association rules

To maintain a DataSource , Goto “RSDMWB”

Expand Association Analysis and Double click the model

In the Left Most corner , You can see the “Maintain Data Source Tab” and Click on it

A popup appears asking for Validity Options for Extracted data

Page 14: Data Mining - Association Analysis

Data Mining: Association Analysis

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 14

Defined in Package->User defined dates during extraction in InfoPackage and we must define the start and end dates in the staging process as part of InfoPackage maintenance. These dates are taken as the valid dates for the extracted data.

Fixed Time Interval->Fixed dates and we must specify the start and end dates while maintaining the DataSource. The default value for the start date is the date on which the datsource is created. The default value for end date is the maximum date, that is, 31.12.9999

Others->We can either enter Date of Extraction or Date of Analysis and Date of analysis is either the training date (for the DataSource based on the training source) or prediction date (for the DataSource based on the prediction source)

Choose the Option Required and Click on “Create”

It displays the details of the associate DataSource as below

Click on Save

A DataSource is Maintained for the created model

Page 15: Data Mining - Association Analysis

Data Mining: Association Analysis

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 15

Related Content

Data Mining: Decision Trees

Data Mining: Clustering

http://forums.sdn.sap.com/thread.jspa?threadID=1186413

For more information, visit the EDW homepage

Page 16: Data Mining - Association Analysis

Data Mining: Association Analysis

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 16

Disclaimer and Liability Notice

This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.