Mining rare patterns and negative patterns The text book is

Mining rare patterns and negative patterns

The text book is data mining: concpets and techniques 3rd.ed.

It would be great if you can give me some hint, or examples, or references reading.

Thank you very much for your time!

7.5 Section 7.2.4 presented various ways of defining negatively correlated patterns. Consider Definition 7.3: \"Suppose that itemsets X and Y are both frequent, that is, sup(X)2 min sup and sup(Y) 2 min sup, where min sup is the minimum support threshold. If (P(XIY) + P(Y| X))/2 , where e is a negative pattern threshold, then pattern XU Y is a negatively correlated pattern.\" Design an eficient pattern growth algorithm for mining the set of negatively correlated patterns.

Solution

it is mainly depending on sensitive and non sensitive attributes.so first define some sensitive attributes in X like ag,race,religion etc... and non sensitive attributes like native-country for Y and taken remaining attributes in Z etc.. all those attributes can be taken from adult data set which is in uci repository...

for example in previos we are having some value for alpha with alpha = 1.25 basing on us federation.........like that we will have some values to take....so take that value to compare and keep it inplace of alpha.....to do on this code first we have to load database.......

for support count we have to select all the attributes containing in that database

try
{
//start1
rs=st.executeQuery(\"SELECT count(*) FROM `preprocess` Where `age`<=30 and race=\'black\' and `sex`=\'male\' and education=\'bachelors\' and native_country=\'united-state\' and class=\'<=50K\'\");
while(rs.next())
{
nemu1=Integer.parseInt(rs.getString(1));
}
  

rs=st.executeQuery(\"SELECT count(*) FROM `preprocess` Where `age`<=30 and race=\'black\' and `sex`=\'male\' and education=\'bachelors\' and native_country=\'united-state\'\");
while(rs.next())
{
denum1=Integer.parseInt(rs.getString(1));
}

rs=st.executeQuery(\"SELECT count(*) FROM `preprocess` Where native_country=\'united-state\' and class=\'<=50K\'\");
while(rs.next())
{
nemu2=Integer.parseInt(rs.getString(1));
}
rs=st.executeQuery(\"SELECT count(*) FROM `preprocess` Where native_country=\'united-state\'\");
while(rs.next())
{
denum2=Integer.parseInt(rs.getString(1));
}

System.out.println(\"nemu1:\"+nemu1+\";nemu2:\"+nemu2+\";denum1:\"+denum1+\";denum2:\"+denum2);
elift = (nemu1/denum1)/(nemu2/denum2);
String rule_type=\"D\";
if(elift > alpha)
{
bw2.append(\"\ (`age`<=30 and race=\'black\' and `sex`=\'male\' and education=\'bachelors\'),(native_country=\'united-state\') -> (class\'<=50k\')\");
rule_type=\"D\";
}
else
{
bw1.append(\"\ (`age`<=30 and race=\'black\' and `sex`=\'male\' and education=\'bachelors\'),(native_country=\'united-state\') -> (class\'<=50k\')\");
rule_type=\"N\";
}
//second start

try{

query =\"insert into rules values (NULL,\\\"(`age`<=30 and race=\'black\' and `sex`=\'male\' and education=\'bachelors\'),(native_country=\'united-state\') -> class\'<=50k\')\\\",\'\"+rule_type+\"\')\";
st.executeUpdate(query);
}
catch(Exception e)
{
System.out.println(\"ERROR-insert::\"+e.getLocalizedMessage());
}
  
rs = st.executeQuery(\"select last_insert_id() as last_id from rules\");
// int rid=0;
while(rs.next())
{
rid = Integer.parseInt(rs.getString(\"last_id\"));

}
query =\"insert into premises values (NULL,\"+rid+\",\'age\',\'<=30\',\'A\'),(NULL,\"+rid+\",\'race\',\'black\',\'A\'),(NULL,\"+rid+\",\'sex\',\'male\',\'A\'),(NULL,\"+rid+\",\'education\',\'bachelors\',\'A\'), (NULL,\"+rid+\",\'native_country\',\'united-state\',\'B\') \";
st.execute(query);

query =\"insert into conclusion values (NULL,\"+rid+\",\'class\',\'<=50K\',\'C\')\";
st.execute(query);

//stop,main logic upto here

Mining rare patterns and negative patterns The text book is data mining: concpets and techniques 3rd.ed. It would be great if you can give me some hint, or exam
Mining rare patterns and negative patterns The text book is data mining: concpets and techniques 3rd.ed. It would be great if you can give me some hint, or exam

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site