Skip to content

Commit

Permalink
Fixed rare bug when -0.0 and 0.0 attribute values appeared in a dataset.
Browse files Browse the repository at this point in the history
  • Loading branch information
agudys committed Dec 19, 2023
1 parent cc9387c commit 9720962
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion adaa.analytics.rules/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ codeQuality {
}

sourceCompatibility = 1.8
version = '1.6.1'
version = '1.6.2'


jar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,10 +460,6 @@ protected ElementaryCondition induceCondition(
Set<Attribute> allowedAttributes,
Object... extraParams) {

if (rule.getPremise().getSubconditions().size() == 3) {
// return null;
}

if (allowedAttributes.size() == 0) {
return null;
}
Expand All @@ -483,10 +479,6 @@ protected ElementaryCondition induceCondition(
// iterate over all allowed decision attributes
for (Attribute attr : allowedAttributes) {

if ((rule.getPremise().getSubconditions().size() == 2) && (!attr.getName().equals("input16"))) {
// continue;
}

// consider attributes in parallel
Future<ConditionEvaluation> future = (Future<ConditionEvaluation>) pool.submit(() -> {

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

// exclude missing values from keypoints
if (Double.isNaN(val)) {
Expand Down

0 comments on commit 9720962

Please sign in to comment.