Skip to content

Commit 9720962

Browse files
committed
Fixed rare bug when -0.0 and 0.0 attribute values appeared in a dataset.
1 parent cc9387c commit 9720962

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

Diff for: adaa.analytics.rules/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ codeQuality {
2727
}
2828

2929
sourceCompatibility = 1.8
30-
version = '1.6.1'
30+
version = '1.6.2'
3131

3232

3333
jar {

Diff for: adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationFinder.java

+1-9
Original file line numberDiff line numberDiff line change
@@ -460,10 +460,6 @@ protected ElementaryCondition induceCondition(
460460
Set<Attribute> allowedAttributes,
461461
Object... extraParams) {
462462

463-
if (rule.getPremise().getSubconditions().size() == 3) {
464-
// return null;
465-
}
466-
467463
if (allowedAttributes.size() == 0) {
468464
return null;
469465
}
@@ -483,10 +479,6 @@ protected ElementaryCondition induceCondition(
483479
// iterate over all allowed decision attributes
484480
for (Attribute attr : allowedAttributes) {
485481

486-
if ((rule.getPremise().getSubconditions().size() == 2) && (!attr.getName().equals("input16"))) {
487-
// continue;
488-
}
489-
490482
// consider attributes in parallel
491483
Future<ConditionEvaluation> future = (Future<ConditionEvaluation>) pool.submit(() -> {
492484

@@ -515,7 +507,7 @@ class TotalPosNeg {
515507
// get all distinctive values of attribute
516508
for (int id : coveredByRule) {
517509
DataRow dr = trainSet.getExample(id).getDataRow();
518-
double val = dr.get(attr);
510+
double val = dr.get(attr) + 0.0; // to eliminate -0.0
519511

520512
// exclude missing values from keypoints
521513
if (Double.isNaN(val)) {

0 commit comments

Comments
 (0)