6. Demonstrate knowledge flow application on data sets
1.Develop a knowledge flow layout for finding strong association rules by using, Apriori algorithm
Aim: Demonstration of association rule process on contactlens.arff using apriori algorithm.
@relation contactlenses
@attribute age {young,pre_pres_byopic,pres_byopic}
@attribute specticle_prescrip {myopia,hypermertropia}
@attribute astigmation {yes,no}
@attribute tear_prod_rate {reduce,normal}
@attribute contact_lenses {none,soft,hard,normal}
@data
young,myopia,no,reduce,none
young,myopia,no,normal,soft
young,myopia,yes,reduce,none
young,myopia,yes,normal,hard
young,hypermertropia,no,reduce,none
young,hypermertropia,no,normal,soft
young,hypermertropia,yes,reduce,none
young,hypermertropia,yes,normal,hard
pre_pres_byopic,myopia,no,reduce,none
pre_pres_byopic,myopia,no,normal,none
pre_pres_byopic,myopia,yes,reduce,soft
pre_pres_byopic,myopia,yes,normal,hard
pre_pres_byopic,hypermertropia,yes,normal,none
pre_pres_byopic,hypermertropia,no,reduce,normal
pre_pres_byopic,hypermertropia,yes,reduce,normal
pre_pres_byopic,myopia,no,normal,none
pre_pres_byopic,myopia,yes,reduce,none
pres_byopic,hypermertropia,yes,normal,soft
Step1:open the data file in weka explorer it is presume the required data have described .
Step2: clicking an association up will bring up the Interface for association algorithm.
Step3:we use Apriori algorithm which is default algorithm
Step 4: In order to change the parameter click on the text box immediately to the right of the choose button.
Step 5: : Now we click on start to rum the Apriori algorithm.
output:
=== Run information ===
Scheme: weka.associations.Apriori -N 10 -T 0 -C 0.9 -D 0.05 -U 1.0 -M 0.1 -S -1.0 -c -1
Relation: contactlenses
Instances: 18
Attributes: 5
age
specticle_prescrip
astigmation
tear_prod_rate
contact_lenses
=== Associator model (full training set) ===
Apriori
=======
Minimum support: 0.15 (3 instances)
Minimum metric <confidence>: 0.9
Number of cycles performed: 17
Generated sets of large itemsets:
Size of set of large itemsets L(1): 11
Size of set of large itemsets L(2): 35
Size of set of large itemsets L(3): 17
Size of set of large itemsets L(4): 1
Best rules found:
1. age=young contact_lenses=none 4 ==> tear_prod_rate=reduce 4 conf:(1)
2. age=young tear_prod_rate=reduce 4 ==> contact_lenses=none 4 conf:(1)
3. contact_lenses=hard 3 ==> astigmation=yes 3 conf:(1)
4. contact_lenses=hard 3 ==> tear_prod_rate=normal 3 conf:(1)
5. tear_prod_rate=normal contact_lenses=none 3 ==> age=pre_pres_byopic 3 conf:(1)
6. tear_prod_rate=normal contact_lenses=hard 3 ==> astigmation=yes 3 conf:(1)
7. astigmation=yes contact_lenses=hard 3 ==> tear_prod_rate=normal 3 conf:(1)
8. contact_lenses=hard 3 ==> astigmation=yes tear_prod_rate=normal 3 conf:(1)
9. age=pre_pres_byopic astigmation=no contact_lenses=none 3 ==> specticle_prescrip=myopia 3 conf:(1)
10. age=pre_pres_byopic specticle_prescrip=myopia astigmation=no 3 ==> contact_lenses=none 3 conf:(1)
Comments
Post a Comment