文档详情

数据挖掘实验一关联规则挖掘.pdf

发布:2024-07-22约8.85千字共8页下载文档
文本预览下载声明

关联规则挖掘

AssociationRuleMining

【一】题目要求

DataDescription:Themarketingdepartmentofafinancialfirmkeepsrecordsoncustomers,

includingdemographicinformationand,numberoftypeofaccounts.Whenlaunchinganewproduct,

suchasaPersonalEquityPlan(PEP),adirectmailpiece,advertisingtheproduct,issent

toexistingcustomers,andarecordkeptastowhetherthatcustomerrespondedandboughtthe

product.Basedonthisstoreofpriorexperience,themanagersdecidetousedataminingtechniques

tobuildcustomerprofilemodels.Inthisparticularproblemweareinterestedonlyinderiving

(quantitative)associationrulesfromthedata(inafutureassignmentwewillconsidertheuse

ofclassification.

Yourgoal:performAssociationRulediscoveryonthedataset.

具体的实验数据在bank-data.txt文件中

【二】实现思路

某财务公司生产了一种新产品,本题提供了600个客户的记录,对这些客户的不同属性进行数据挖掘。

根据题目要求,首先应该对数据进行全面分析。有些属性可以忽略不计,因此,需要识别出哪些是特殊属

性,哪些是可忽略属性。然后对非离散数据进行离散化,最后通过aprior算法进行关联规则和相关性分析,

来挖掘出频繁项集。

【三】解题过程详细分析

采用Apriori算法发现频繁项集。Apriori算法是发现频繁项集的基本算法。Apriori算法该算法使用

逐层搜索的迭代方法,k项集用于探索(k+1)项集。首先,通过扫描数据库,累积每个项的计数,并收集

满足最小支持度的项,找出频繁1项集的集合。记作L,然后L用于找频繁2项集的集合L,如此循环下

112

去,直到再找不到频繁项集。找每个L需要一次数据库扫描。

K

Apriori算法思想如下:

1)L=find_frequent_1_itemsets(D);

1

2)for(k=2;L;k++){

k1

3)C=aproiri_gen(L,min_sup);

kk1

4)foreachtransactiont∈D{//scanDforcount

5)C=subset(C,t);//getsubsetsoftthatarecandidates

tk

6)foreachcandidatec∈C

t

7)c.count++;

8)}

9)L={cC|c.count≥min_sup}

kk

10)}

11)returnL=L;

显示全部
相似文档