|
|
|
@ -162,13 +162,13 @@ public class Apriori {
|
|
|
|
|
}
|
|
|
|
|
str = C.toString();
|
|
|
|
|
|
|
|
|
|
// System.out.println("候选"+t+"项集:C: \n"+C);
|
|
|
|
|
System.out.println("候选"+t+"项集:C: \n"+C);
|
|
|
|
|
// 二、剪枝步
|
|
|
|
|
pruning(C, L,min_support);
|
|
|
|
|
// System.out.println("频繁"+t+"项集:L: \n"+L+"\n");
|
|
|
|
|
System.out.println("频繁"+t+"项集:L: \n"+L+"\n");
|
|
|
|
|
str = L.toString();
|
|
|
|
|
|
|
|
|
|
//System.out.println("===");
|
|
|
|
|
System.out.println("===");
|
|
|
|
|
L_ALL.putAll(L);
|
|
|
|
|
}
|
|
|
|
|
return L_temp;
|
|
|
|
@ -252,7 +252,7 @@ public class Apriori {
|
|
|
|
|
if (confident > min_confident) {// 如果事件的置信度大于最小置信度
|
|
|
|
|
//封装对象返回
|
|
|
|
|
|
|
|
|
|
DecimalFormat df = new DecimalFormat("#.0");
|
|
|
|
|
DecimalFormat df = new DecimalFormat("#.00");
|
|
|
|
|
AssociationRulesDTO associationRulesDTO=new AssociationRulesDTO();
|
|
|
|
|
associationRulesDTO.setCorrelation(item_pre);
|
|
|
|
|
associationRulesDTO.setAssociated(item_post);
|
|
|
|
|