Skip to content

Commit 9bfa1ac

Browse files
committed
Some logging added during contrast sets induction.
1 parent 3553664 commit 9bfa1ac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/representation/ContrastRuleSet.java

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.apache.commons.collections15.Predicate;
1111

1212
import java.util.*;
13+
import java.util.logging.Level;
1314

1415
public class ContrastRuleSet extends ClassificationRuleSet {
1516

@@ -128,6 +129,8 @@ public void add(String positiveClass, String negativeClass, ContrastRule rule) {
128129
List<ContrastRule> dest = sets.get(key);
129130
double maxCost = 0;
130131

132+
Logger.log("Redundancy " + rule + ":\n", Level.FINER);
133+
131134
Set<String> queryAttrs = rule.getPremise().getAttributes();
132135
for (Rule r : dest) {
133136
Set<String> refAttrs = r.getPremise().getAttributes();
@@ -140,6 +143,8 @@ public void add(String positiveClass, String negativeClass, ContrastRule rule) {
140143
union = rule.weighted_p + r.weighted_p - intersection;
141144
double exampleJaccard = intersection / union;
142145

146+
Logger.log("\tExisting " + r + ":" + attributeJaccard + " * " + exampleJaccard + "\n", Level.FINER);
147+
143148
double cost = attributeJaccard * exampleJaccard;
144149
if (cost > maxCost) {
145150
maxCost = cost;

0 commit comments

Comments
 (0)