Skip to content

Commit 87cd558

Browse files
committed
Override fix. Regression contrast sets still not the same as in 1.7.15.
1 parent aac5657 commit 87cd558

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ContrastRegressionFinder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ public void postprocess(
138138
notifyRuleReady(rule);
139139
}
140140

141-
142-
boolean checkCoverage(double p, double n, double new_p, double new_n, double P, double N) {
141+
@Override
142+
boolean checkCoverage(double p, double n, double new_p, double new_n, double P, double N,double uncoveredSize, int ruleOrderNum) {
143143
return ((new_p) >= params.getAbsoluteMinimumCovered(P)) &&
144144
((p) >= params.getAbsoluteMinimumCoveredAll(P));
145145
}

adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ContrastSurvivalFinder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ protected boolean checkCandidate(
202202
return false;
203203
}
204204

205-
206-
boolean checkCoverage(double p, double n, double new_p, double new_n, double P, double N) {
205+
@Override
206+
boolean checkCoverage(double p, double n, double new_p, double new_n, double P, double N,double uncoveredSize, int ruleOrderNum) {
207207
return ((new_p) >= params.getAbsoluteMinimumCovered(P)) &&
208208
((p) >= params.getAbsoluteMinimumCoveredAll(P));
209209
}

adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/representation/ContrastRegressionExampleSet.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import java.util.ArrayList;
1313
import java.util.List;
14+
import java.util.logging.Level;
1415

1516
public class ContrastRegressionExampleSet extends SortedExampleSetEx implements IContrastExampleSet {
1617

@@ -45,6 +46,8 @@ public ContrastRegressionExampleSet(SimpleExampleSet exampleSet) {
4546
exampleSet.recalculateAttributeStatistics(label);
4647
trainingEstimator = exampleSet.getStatistics(label, averageName);
4748

49+
Logger.log("Training estimator: " + trainingEstimator + "\n", Level.FINE);
50+
4851
// establish contrast groups estimator
4952
try {
5053
NominalMapping mapping = contrastAttribute.getMapping();
@@ -56,6 +59,8 @@ public ContrastRegressionExampleSet(SimpleExampleSet exampleSet) {
5659
ExampleSet conditionedSet = new ConditionedExampleSet(exampleSet,cnd);
5760
conditionedSet.recalculateAttributeStatistics(label);
5861
groupEstimators.add(conditionedSet.getStatistics(label, averageName));
62+
63+
Logger.log("Group estimator [" + mapping.mapIndex(i) + "]: " + groupEstimators.get(i) + "\n", Level.FINE);
5964
}
6065

6166
} catch (ExpressionEvaluationException e) {

0 commit comments

Comments
 (0)