Friday, March 30, 2012

HELP!!:about the MS association rules

When i use the MS association rules ,i don't know how it is worked on the background .I stuy the Fp-Growth algorithm , but there're some questions , I don't kown what's the meaning of transcation database. who can give me one example ? thanks .I know we can store the data in relation database,but in basket Analysis ,how a transaction stroed in relation database?

In the context of Association Rules/Market Basket Analysis, we are talking about the contents of the "basket" when we refer to the transaction table. In a relational database, you'd typically have a master table containing information about customers (for instance) and a detail table that has a foreign key relationship with the master table and holds the associated purchases for each customer.

The more common approach for market basket analysis is to model each transaction (containing multiple items) as a case so your transaction table would have a composite key comprising the transaction id and item id, with multiple rows for each transaction id, comprising all items that were bought together as part of that single transaction. From the point of view of SQL Data Mining, you would use the same table as the "case table" as well as the "nested table" containing the associated items for each transaction.

See this article for an example: http://www.aspnetpro.com/newsletterarticle/2004/10/asp200410ri_l/asp200410ri_l.asp.

|||

hi, Raman Iyer ,your answer is helpful for me,thanks .This problem I had resoved several days ago ,but when i looked at the article your offerd for me, i also got much help.thank you.

there is another problem in my study, I had write the Fp_Growth algorithm, and had got the Fp itemsets ,but when i wanted to display these itemsets into association rules , i met the problem. I stored the itemsets in relation database,for example :

ItemsetsID

Itemid

itemsetsCount

1

I1

3

1

I2

3

2

I1

4

2

I3

4

3

I1

3

3

I2

3

3

I3

3

4

I2

3

4

I3

3

……………

…………

……………

it means there're 4 itemset (I1,I2 : 3),(I1,I3 :4 ),(I2,I3 : 3 )and(I1,I2,I3 : 3),and the |D|=10(|D|means the num of the transaction )

Count(I1)=7

Count(I2)=6

Count(I3)=7

Count(I1,I2)=3

Count(I1,I3)=4

Count(I1,I2,I3)=3

Count(I2,I3)=3

so i want to get the rules like this ,

Interesting = support(left+right)/(support(left)*support(right))

Ruleid

Left

Right

Support

Confidence

Interesting

1

I1

I2

0.3

3/7

0.3/(0.7*0.7)

2

I2

I1

0.3

3/6

0.3/(0.7*0.6)

3

I1

I3

0.4

4/7

0.4/(0.7*0.7)

4

I3

I1

0.4

4/7

0.4/(0.7*0.7)

5

I1

I2,I3

0.3

3/7

0.3/(0.7*0.3)

6

I2

I1,I3

0.3

3/6

0.3/(0.6*0.4)

7

I3

I1,I2

0.3

3/7

0.3/(0.7*0.3)

8

I1,I2

I3

0.3

3/3

0.3/(0.3*0.7)

9

I1,I3

I2

0.3

3/4

0.3/(0.4*0.6)

10

I2,I3

I1

0.3

3/3

0.3/(0.3*0.7)

11

I2

I3

0.3

3/6

0.3/(0.6*0.7)

12

I3

I2

0.3

3/7

0.3/(0.7*0.6)

what the type can i store the rule in my relation database , just like the table 2? and what's the tool or technology can i use to display these rules in my webpage , owc?or reporting service? Are there any article that i shoud read , can you give me some advice? thank you

No comments:

Post a Comment