The Data Mining Forum
but i've got another problem, when i run my data transaction.txt with my MIS.txt, the output isn't correct, i've got many rules that some of them doesn't have confidence count, and also some of the rules were duplicate rules
At first I'm wondering whether it affects the results of the calculation of association rules. But i'm finally realised that the infrequent items (ex. 126) indeed shouldn't be included in calculation of ass.rule, because the items(like 126) is less than MIN_Freq. Correct me if i'm mistaken, thanks again sir 
=15%, MIS(C)=30%, MIS(D)=40%.
, MIS(C), MIS(D)]= 5%.
private void writeItemsetToFile(int[] itemset, int lastItem, int support)
throws IOException {
// increase the number of frequent itemsets found
itemsetCount++;
private void writeItemsetToFile(int[] itemset, int lastItem, int support)
throws IOException {
// increase the number of frequent itemsets found
itemsetCount++;
Arrays.sort(itemset);------- ASSOCIATION RULES ------- rule 0: 5 ==> 6 support : 0.15 (3/20) confidence : 0.75 rule 1: 6 ==> 5 support : 0.15 (3/20) confidence : 1.0 rule 2: 1 ==> 2 support : 0.4 (8/20) confidence : 0.6666666666666666 rule 3: 2 ==> 1 support : 0.4 (8/20) confidence : 0.8888888888888888 --------------------------------
My name is Manperta Negara Situmorang.Thank you for the reward, sir 
/**
* Write a frequent itemset that is found to the output file.
* @param itemset an itemset
* @param lastItem an item that should be appended to the itemset
* @param support the support of "itemset" + "item".
*/
private void writeItemsetToFile(int[] itemset, int lastItem, int support)
throws IOException {
// increase the number of frequent itemsets found
itemsetCount++;
// if the result should be saved to a file
if(writer != null){
// Create a string buffer
StringBuffer buffer = new StringBuffer( );
// write the items of the itemset
for(int i=0; i< itemset.length; i++){
buffer.append(itemset);
buffer.append(' ');
}
buffer.append(lastItem);
// Then, write the support
buffer.append(" #SUP: "
;
buffer.append(support);
// write to file and create a new line
writer.write(buffer.toString());
writer.newLine();
}// otherwise the result is kept into memory
else{
// concatenate the last item to the itemset
int [] itemsetWithLastItem = new int[itemset.length+1];
System.arraycopy(itemset, 0, itemsetWithLastItem, 0, itemset.length);
itemsetWithLastItem[itemset.length] = lastItem;
Arrays.sort(itemsetWithLastItem); // ADDED TO FIX ASSOCIATION RULE BUG FOR CFPGROWTH+
// create an object Itemset and add it to the set of patterns
// found.
Itemset itemsetObj = new Itemset(itemsetWithLastItem);
itemsetObj.setAbsoluteSupport(support);
patterns.addItemset(itemsetObj, itemsetObj.size());
}
}