From 24243cd0118db237c8f61ce880a702fe617f4ed7 Mon Sep 17 00:00:00 2001 From: agudys Date: Fri, 22 Nov 2024 12:38:25 +0100 Subject: [PATCH] Fixed multiple bugs in the expert mode: - crash when adjusting conditions with nominal attributes (issue 126). - `mincov` parameter not set to the number of uncovered examples in the expert classification rules - complementary conditions not supported in the expert knowledge --- adaa.analytics.rules/build.gradle | 2 +- .../rules/logic/induction/AbstractFinder.java | 15 ++--- .../ApproximateClassificationFinder.java | 3 +- .../induction/ClassificationExpertFinder.java | 47 +++++++++----- .../induction/ClassificationExpertSnC.java | 13 +++- .../logic/induction/ClassificationFinder.java | 27 +++++--- .../logic/induction/ClassificationSnC.java | 9 ++- .../induction/RegressionExpertFinder.java | 35 ++++++----- .../logic/induction/RegressionFinder.java | 16 ++--- .../logic/representation/RuleParser.java | 9 ++- .../config/ClassificationExpertSnCTest.xml | 63 +++++++++++++------ ...0 extended.seismic-bumps-train-minimal.txt | 2 + ...gy_senergy.seismic-bumps-train-minimal.txt | 2 + ...OR ghazard.seismic-bumps-train-minimal.txt | 2 + ...rgy +shift.seismic-bumps-train-minimal.txt | 1 + ...s +ghazard.seismic-bumps-train-minimal.txt | 2 + 16 files changed, 166 insertions(+), 82 deletions(-) diff --git a/adaa.analytics.rules/build.gradle b/adaa.analytics.rules/build.gradle index e3338740..44bb100f 100644 --- a/adaa.analytics.rules/build.gradle +++ b/adaa.analytics.rules/build.gradle @@ -5,7 +5,7 @@ plugins { id 'java' } -version = '2.1.22' +version = '2.1.23' java { sourceCompatibility = JavaVersion.VERSION_1_8 } diff --git a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/AbstractFinder.java b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/AbstractFinder.java index 8e12a486..2f498c86 100644 --- a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/AbstractFinder.java +++ b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/AbstractFinder.java @@ -30,6 +30,7 @@ import adaa.analytics.rules.logic.representation.condition.ElementaryCondition; import adaa.analytics.rules.logic.representation.rule.Rule; import adaa.analytics.rules.utils.Logger; +import adaa.analytics.rules.utils.Pair; /** * Abstract base class for growing and pruning procedures for all types of rules (classification, regression, survival). @@ -350,7 +351,7 @@ public void postprocess( /** * Abstract method representing all procedures which induce an elementary condition. - * + * * @param rule Current rule. * @param trainSet Training set. * @param uncoveredByRuleset Set of examples uncovered by the model. @@ -360,12 +361,12 @@ public void postprocess( * @return Induced elementary condition. */ protected abstract ElementaryCondition induceCondition( - final Rule rule, - final IExampleSet trainSet, - final Set uncoveredByRuleset, - final Set coveredByRule, - final Set allowedAttributes, - Object... extraParams); + final Rule rule, + final IExampleSet trainSet, + final Set uncoveredByRuleset, + final Set coveredByRule, + final Set allowedAttributes, + Pair... extraParams); /** * Maps a set of attribute names to a set of attributes. diff --git a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ApproximateClassificationFinder.java b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ApproximateClassificationFinder.java index 19174a3d..8d2692fe 100644 --- a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ApproximateClassificationFinder.java +++ b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ApproximateClassificationFinder.java @@ -11,6 +11,7 @@ import adaa.analytics.rules.logic.representation.valueset.SingletonSet; import adaa.analytics.rules.logic.representation.valueset.SingletonSetComplement; import adaa.analytics.rules.utils.Logger; +import adaa.analytics.rules.utils.Pair; import tech.tablesaw.api.DoubleColumn; import java.util.*; @@ -289,7 +290,7 @@ protected ElementaryCondition induceCondition( Set uncoveredPositives, Set coveredByRule, Set allowedAttributes, - Object... extraParams) { + Pair... extraParams) { if (allowedAttributes.size() == 0) { return null; diff --git a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationExpertFinder.java b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationExpertFinder.java index 3d55524c..9953de41 100644 --- a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationExpertFinder.java +++ b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationExpertFinder.java @@ -27,6 +27,7 @@ import adaa.analytics.rules.logic.representation.valueset.SingletonSet; import adaa.analytics.rules.logic.representation.valueset.Universum; import adaa.analytics.rules.utils.Logger; +import adaa.analytics.rules.utils.Pair; import org.apache.commons.lang3.SerializationUtils; import tech.tablesaw.api.DoubleColumn; @@ -85,17 +86,20 @@ public void adjust( CompoundCondition expertPremise = rule.getPremise(); rule.setPremise(new CompoundCondition()); - HashSet covered = new HashSet(); + //HashSet covered = new HashSet(); + Set covered = new IntegerBitSet(dataset.size()); // bit vectors for faster operations on coverings covered.addAll(rule.getCoveredPositives()); covered.addAll(rule.getCoveredNegatives()); - + for (ConditionBase cnd : expertPremise.getSubconditions()) { ElementaryCondition ec = (ElementaryCondition)cnd; ElementaryCondition newCondition; - + + boolean alreadyAdded = false; + if (ec.isAdjustable()) { // determine attribute Set attr = new TreeSet(new AttributeComparator()); @@ -113,13 +117,24 @@ public void adjust( ec.evaluate(dataset, mustBeCovered); mustBeCovered.retainAll(rule.getCoveredPositives()); } - - newCondition = induceCondition( - rule, dataset, mustBeCovered, covered, attr); - newCondition.setType(Type.FORCED); - tryAddCondition(rule, null, newCondition, dataset, covered, uncoveredPositives); - - } else { + + if (mustBeCovered.size() > 0) { + newCondition = induceCondition( + rule, dataset, mustBeCovered, covered, attr, new Pair("disable_precision_control", (Object) true)); + + // use original condition if adjustment fails + if (newCondition != null) { + newCondition.setType(Type.FORCED); + tryAddCondition(rule, null, newCondition, dataset, covered, mustBeCovered); + alreadyAdded = true; + } else { + Logger.log("Unable to adjust condition: " + ec, Level.FINE); + } + } else { + Logger.log("Adjustable condition does not cover any positives: " + ec, Level.FINE); + } + } + if (!alreadyAdded) { // add condition as it is without verification IntegerBitSet conditionCovered = new IntegerBitSet(dataset.size()); newCondition = SerializationUtils.clone(ec); @@ -305,7 +320,9 @@ public int grow( int preferredCounter = knowledge.getPreferredAttributesPerRule(); do { - ElementaryCondition condition = induceCondition(rule, dataset, uncoveredPositives, covered, localAllowed, rule.getCoveredPositives()); + ElementaryCondition condition = induceCondition(rule, dataset, uncoveredPositives, covered, localAllowed, + new Pair("covered_positives", rule.getCoveredPositives())); + carryOn = tryAddCondition(rule, null, condition, dataset, covered,uncoveredPositives); // fixme: we are not sure if condition was added if (carryOn) { @@ -340,7 +357,8 @@ public int grow( do { ElementaryCondition condition = induceCondition( - rule, dataset, uncoveredPositives, covered, allowedAttributes, rule.getCoveredPositives()); + rule, dataset, uncoveredPositives, covered, allowedAttributes, + new Pair("covered_positives", rule.getCoveredPositives())); if (params.getSelectBestCandidate()) { carryOn = tryAddCondition(currentRule, rule, condition, dataset, covered, uncoveredPositives); @@ -367,9 +385,8 @@ public int grow( */ @Override protected boolean checkCandidate(ElementaryCondition cnd, double classId, double p, double n, double new_p, double P,double uncoveredSize, int ruleOrderNum) { - return new_p >= params.getAbsoluteMinimumCovered(P) - && p >= params.getAbsoluteMinimumCoveredAll(P) - && !knowledge.isForbidden(cnd.getAttribute(), cnd.getValueSet(), (int)classId); + boolean ok = super.checkCandidate(cnd, classId, p, n, new_p, P, uncoveredSize, ruleOrderNum); + return ok && !knowledge.isForbidden(cnd.getAttribute(), cnd.getValueSet(), (int)classId); } diff --git a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationExpertSnC.java b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationExpertSnC.java index 85451589..095a188f 100644 --- a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationExpertSnC.java +++ b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationExpertSnC.java @@ -229,9 +229,18 @@ public ClassificationRuleSet run(IExampleSet dataset) uncoveredPositives.removeAll(rule.getCoveredPositives()); uncovered.removeAll(rule.getCoveredPositives()); uncovered.removeAll(rule.getCoveredNegatives()); - + + double uncovered_p = 0; + if (dataset.getAttributes().getWeight() == null) { + uncovered_p = uncoveredPositives.size(); + } else { + for (int id : uncoveredPositives) { + uncovered_p += weightDataColumnDoubleAdapter.getDouble(id); + } + } + // stop if no positive examples remaining - if (uncoveredPositives.size() == 0) { + if (uncovered_p <= params.getMaximumUncoveredFraction() * weighted_P) { carryOn = false; } diff --git a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationFinder.java b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationFinder.java index dbb6e668..1c0c242b 100644 --- a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationFinder.java +++ b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationFinder.java @@ -32,6 +32,7 @@ import adaa.analytics.rules.logic.representation.valueset.SingletonSet; import adaa.analytics.rules.logic.representation.valueset.SingletonSetComplement; import adaa.analytics.rules.utils.Logger; +import adaa.analytics.rules.utils.Pair; import tech.tablesaw.api.DoubleColumn; @@ -465,7 +466,7 @@ public void postprocess( /** * Induces an elementary condition. - * + * * @param rule Current rule. * @param trainSet Training set. * @param uncoveredPositives Set of positive examples uncovered by the model. @@ -476,12 +477,12 @@ public void postprocess( */ @Override protected ElementaryCondition induceCondition( - Rule rule, - IExampleSet trainSet, - Set uncoveredPositives, - Set coveredByRule, - Set allowedAttributes, - Object... extraParams) { + Rule rule, + IExampleSet trainSet, + Set uncoveredPositives, + Set coveredByRule, + Set allowedAttributes, + Pair... extraParams) { if (allowedAttributes.size() == 0) { return null; @@ -495,7 +496,17 @@ protected ElementaryCondition induceCondition( double P = rule.getWeighted_P(); double N = rule.getWeighted_N(); - double apriori_prec = params.isControlAprioriPrecision() + + boolean controlPrecision = params.isControlAprioriPrecision(); + // override precision verification + for (Pair param : extraParams) { + if (param.getFirst().equals("disable_precision_control") && (Boolean)param.getSecond()) { + controlPrecision = false; + break; + } + } + + double apriori_prec = controlPrecision ? P / (P + N) : Double.MIN_VALUE; diff --git a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationSnC.java b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationSnC.java index fd2c3a9c..4230f6f7 100644 --- a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationSnC.java +++ b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/ClassificationSnC.java @@ -165,9 +165,12 @@ public RuleSetBase run(IExampleSet dataset) { uncovered.removeAll(rule.getCoveredNegatives()); uncovered_p = 0; - - for (int id : uncoveredPositives) { - uncovered_p += dataset.getAttributes().getWeight() == null ? 1.0 : weightDataColumnDoubleAdapter.getDouble(id); + if (dataset.getAttributes().getWeight() == null) { + uncovered_p = uncoveredPositives.size(); + } else { + for (int id : uncoveredPositives) { + uncovered_p += weightDataColumnDoubleAdapter.getDouble(id); + } } Logger.log("Uncovered positives" + uncovered_p + "\n", Level.FINER); diff --git a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/RegressionExpertFinder.java b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/RegressionExpertFinder.java index 9e61b21e..e4493708 100644 --- a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/RegressionExpertFinder.java +++ b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/RegressionExpertFinder.java @@ -62,6 +62,8 @@ public void adjust( for (ConditionBase cnd : expertPremise.getSubconditions()) { ElementaryCondition ec = (ElementaryCondition)cnd; + boolean alreadyAdded = false; + if (ec.isAdjustable()) { // update covering information - needed for automatic induction @@ -84,23 +86,26 @@ public void adjust( } else { // condition in other form - find best condition using this attribute with non-empty intersection with specified condition - mustBeCovered = new HashSet(); - for (int i : covered) { - if (ec.evaluate(dataset.getExample(i))) { - mustBeCovered.add(i); - } - } + mustBeCovered = new IntegerBitSet(dataset.size()); + ec.evaluate(dataset, mustBeCovered); + mustBeCovered.retainAll(rule.getCoveredPositives()); } - - ElementaryCondition newCondition = induceCondition( - rule, dataset, mustBeCovered, covered, attr); - - if (newCondition != null) { - newCondition.setType(Type.FORCED); - rule.getPremise().addSubcondition(newCondition); + + if (!mustBeCovered.isEmpty()) { + ElementaryCondition newCondition = induceCondition( + rule, dataset, mustBeCovered, covered, attr); + + if (newCondition != null) { + newCondition.setType(Type.FORCED); + rule.getPremise().addSubcondition(newCondition); + alreadyAdded = true; + } + } else { + Logger.log("Adjustable condition does not cover any positives: " + ec, Level.FINE); } - - } else { + } + + if (!alreadyAdded) { rule.getPremise().addSubcondition((ElementaryCondition)SerializationUtils.clone(ec)); } } diff --git a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/RegressionFinder.java b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/RegressionFinder.java index ed89b6e5..b442bf92 100644 --- a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/RegressionFinder.java +++ b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/induction/RegressionFinder.java @@ -14,7 +14,6 @@ ******************************************************************************/ package adaa.analytics.rules.logic.induction; -import adaa.analytics.rules.data.metadata.EColumnSortDirections; import adaa.analytics.rules.logic.representation.*; import adaa.analytics.rules.data.IAttribute; @@ -29,6 +28,7 @@ import adaa.analytics.rules.logic.representation.valueset.SingletonSet; import adaa.analytics.rules.logic.representation.valueset.SingletonSetComplement; import adaa.analytics.rules.utils.Logger; +import adaa.analytics.rules.utils.Pair; import tech.tablesaw.api.DoubleColumn; import java.security.InvalidParameterException; @@ -55,7 +55,7 @@ protected ElementaryCondition induceCondition_mean( final Set uncovered, final Set covered, final Set allowedAttributes, - Object... extraParams) { + Pair... extraParams) { RegressionExampleSet set = (dataset instanceof RegressionExampleSet) ? (RegressionExampleSet)dataset : null; if (set == null) { @@ -300,12 +300,12 @@ class Stats{ @Override protected ElementaryCondition induceCondition( - final Rule rule, - final IExampleSet dataset, - final Set uncovered, - final Set covered, - final Set allowedAttributes, - Object... extraParams) { + final Rule rule, + final IExampleSet dataset, + final Set uncovered, + final Set covered, + final Set allowedAttributes, + Pair... extraParams) { if (allowedAttributes.size() == 0) { return null; diff --git a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/representation/RuleParser.java b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/representation/RuleParser.java index 9636e8f9..92e65cb4 100644 --- a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/representation/RuleParser.java +++ b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/representation/RuleParser.java @@ -173,9 +173,10 @@ public static ElementaryCondition parseElementaryCondition(String s, IAttributes if (Pattern.compile("Any").matcher(valueString).find()) { valueSet = new Universum(); } else if (attributeMeta.isNominal()) { - regex = Pattern.compile("\\{(?.+)\\}"); + regex = Pattern.compile("(?(!?))\\{(?.+)\\}"); matcher = regex.matcher(valueString); if (matcher.find()) { + String negation = matcher.group("negation"); String value = matcher.group("discrete"); if (value.equals("NaN") && isSurvival) { @@ -188,7 +189,11 @@ public static ElementaryCondition parseElementaryCondition(String s, IAttributes Logger.log("Invalid value <" + value + "> of the nominal attribute <" + attribute + ">" + "\n", Level.WARNING); return null; } - valueSet = new SingletonSet(v, mapping); + if (negation.isEmpty()) { + valueSet = new SingletonSet(v, mapping); + } else { + valueSet = new SingletonSetComplement(v, mapping); + } } } diff --git a/adaa.analytics.rules/test/resources/config/ClassificationExpertSnCTest.xml b/adaa.analytics.rules/test/resources/config/ClassificationExpertSnCTest.xml index ce8ab47a..cf306e6e 100644 --- a/adaa.analytics.rules/test/resources/config/ClassificationExpertSnCTest.xml +++ b/adaa.analytics.rules/test/resources/config/ClassificationExpertSnCTest.xml @@ -166,27 +166,50 @@ 1: IF [[nbumps3 = Any]] THEN class = {1} + + + 8 + C2 + C2 + C2 + 0 + true + + IF gimpuls @= Any THEN class = {0} + IF gimpuls @= <200, inf) THEN class = {0} + IF gimpuls @= Any THEN class = {1} + IF gimpuls @= (300,350) THEN class = {1} + + + + + + 8 + C2 + C2 + C2 + 0 + true + + IF seismoacoustic @= Any THEN class = {0} + IF seismoacoustic @= Any THEN class = {1} + + - - - - - - - - - - - - - - - - - - - - + + 8 + C2 + C2 + C2 + 0 + true + true + + IF seismoacoustic @= !{b} THEN class = {0} + IF seismoacoustic @= {a} THEN class = {1} + + + diff --git a/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c2, gimpuls_750 extended.seismic-bumps-train-minimal.txt b/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c2, gimpuls_750 extended.seismic-bumps-train-minimal.txt index 46e79421..f1fd9301 100644 --- a/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c2, gimpuls_750 extended.seismic-bumps-train-minimal.txt +++ b/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c2, gimpuls_750 extended.seismic-bumps-train-minimal.txt @@ -3,4 +3,6 @@ Rules IF [gimpuls = (-inf, 1350.50)] THEN class = {0} IF gimpuls = (-inf, 2784) AND nbumps = (-inf, 5.50) AND goimpuls = <-39, 111) AND goenergy = <-32.50, inf) THEN class = {0} + IF nbumps = (-inf, 1.50) AND seismoacoustic = {a} AND goimpuls = <-6.50, inf) THEN class = {0} IF [gimpuls = <408.50, inf)] AND genergy = <35165, 294530) AND goenergy = (-inf, 94.50) AND ghazard = {a} AND senergy = (-inf, 8750) AND nbumps3 = (-inf, 2.50) AND maxenergy = (-inf, 6500) THEN class = {1} + IF genergy = <18890, 1158410) AND ghazard = {a} AND maxenergy = (-inf, 45000) AND gimpuls = <174.50, inf) AND goimpuls = <-72, 58) AND goenergy = (-inf, 50) AND nbumps3 = (-inf, 1.50) AND nbumps2 = (-inf, 2.50) THEN class = {1} diff --git a/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c3, gimpuls_genergy_senergy.seismic-bumps-train-minimal.txt b/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c3, gimpuls_genergy_senergy.seismic-bumps-train-minimal.txt index 790f1e83..5c223950 100644 --- a/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c3, gimpuls_genergy_senergy.seismic-bumps-train-minimal.txt +++ b/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c3, gimpuls_genergy_senergy.seismic-bumps-train-minimal.txt @@ -5,4 +5,6 @@ Rules IF [gimpuls = (-inf, 1350.50)] AND [senergy = (-inf, 5750)] AND nbumps = (-inf, 2.50) AND goenergy = <-73.50, inf) THEN class = {0} IF [gimpuls = (-inf, 1350.50)] AND [genergy = (-inf, 122140)] AND nbumps = (-inf, 5.50) AND goenergy = <-73.50, inf) THEN class = {0} IF [gimpuls = (-inf, 2784)] AND [senergy = (-inf, 5750)] AND goenergy = <-73.50, inf) AND goimpuls = (-inf, 107.50) THEN class = {0} + IF [gimpuls = (-inf, 2784)] THEN class = {0} IF [genergy = <18890, inf)] AND [senergy = <950, inf)] AND goimpuls = (-inf, 10.50) AND maxenergy = (-inf, 6500) AND shift = {W} AND goenergy = (-inf, 12) AND gimpuls = (-inf, 1845.50) AND nbumps3 = <0.50, inf) AND ghazard = {a} THEN class = {1} + IF [genergy = <18890, inf)] AND [gimpuls = <174.50, inf)] AND goenergy = (-inf, 92) AND ghazard = {a} AND maxenergy = (-inf, 45000) AND goimpuls = <-72, inf) AND nbumps3 = (-inf, 1.50) AND nbumps2 = (-inf, 2.50) THEN class = {1} diff --git a/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c4, seismic OR seismoacoustic OR ghazard.seismic-bumps-train-minimal.txt b/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c4, seismic OR seismoacoustic OR ghazard.seismic-bumps-train-minimal.txt index 636e728d..58c3c08a 100644 --- a/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c4, seismic OR seismoacoustic OR ghazard.seismic-bumps-train-minimal.txt +++ b/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c4, seismic OR seismoacoustic OR ghazard.seismic-bumps-train-minimal.txt @@ -9,4 +9,6 @@ Rules IF [seismoacoustic = {a}] AND gimpuls = (-inf, 1350.50) AND goimpuls = <-39.50, inf) THEN class = {0} IF nbumps = (-inf, 1.50) AND genergy = (-inf, 25125) THEN class = {0} IF gimpuls = (-inf, 1350.50) AND nbumps = (-inf, 2.50) AND goenergy = <-73.50, inf) THEN class = {0} + IF gimpuls = (-inf, 2784) AND nbumps = (-inf, 5.50) THEN class = {0} IF [seismic = {b}] AND genergy = <25125, inf) AND goenergy = <-39, 94.50) AND goimpuls = <-15.50, inf) AND ghazard = {a} AND maxenergy = (-inf, 45000) THEN class = {1} + IF genergy = <18890, inf) AND maxenergy = (-inf, 6500) AND gimpuls = <166, inf) AND goimpuls = <-72, -17.50) AND nbumps2 = (-inf, 2.50) AND nbumps3 = (-inf, 1.50) AND goenergy = (-inf, -19) AND seismic = {a} THEN class = {1} diff --git a/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c5, +seismic +nbumps +energy +maxenergy +shift.seismic-bumps-train-minimal.txt b/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c5, +seismic +nbumps +energy +maxenergy +shift.seismic-bumps-train-minimal.txt index 1bbfcc2e..d88ca62a 100644 --- a/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c5, +seismic +nbumps +energy +maxenergy +shift.seismic-bumps-train-minimal.txt +++ b/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c5, +seismic +nbumps +energy +maxenergy +shift.seismic-bumps-train-minimal.txt @@ -6,3 +6,4 @@ Rules IF genergy = (-inf, 117615) AND goenergy = <-73.50, inf) AND nbumps2 = (-inf, 1.50) THEN class = {0} IF nbumps = (-inf, 5.50) THEN class = {0} IF genergy = <18890, 314675) AND goenergy = (-inf, 9) AND nbumps3 = <0.50, inf) AND shift = {W} AND maxenergy = (-inf, 6500) THEN class = {1} + IF genergy = <18890, 1158410) AND goenergy = (-inf, 92) AND maxenergy = (-inf, 45000) AND nbumps3 = (-inf, 1.50) AND nbumps2 = (-inf, 2.50) THEN class = {1} diff --git a/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c6, +seismoacoustic +shift +genergy +gimpuls +genergy +goimpuls +ghazard.seismic-bumps-train-minimal.txt b/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c6, +seismoacoustic +shift +genergy +gimpuls +genergy +goimpuls +ghazard.seismic-bumps-train-minimal.txt index 8384d0a5..26ad4bbb 100644 --- a/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c6, +seismoacoustic +shift +genergy +gimpuls +genergy +goimpuls +ghazard.seismic-bumps-train-minimal.txt +++ b/adaa.analytics.rules/test/resources/reports/ClassificationExpertSnCTest/test_seismic-bumps.guided-c6, +seismoacoustic +shift +genergy +gimpuls +genergy +goimpuls +ghazard.seismic-bumps-train-minimal.txt @@ -3,4 +3,6 @@ Rules IF gimpuls = (-inf, 1350.50) THEN class = {0} IF gimpuls = (-inf, 2784) AND goimpuls = <-39, 111) AND goenergy = <-32.50, inf) THEN class = {0} + IF gimpuls = (-inf, 2784) AND seismoacoustic = {a} AND goimpuls = <-7.50, inf) THEN class = {0} IF goenergy = <-38.50, 9) AND genergy = <24830, 314675) AND goimpuls = (-inf, 17.50) AND ghazard = {a} AND gimpuls = <263, 1878) AND shift = {W} THEN class = {1} + IF genergy = <18890, 1158410) AND goenergy = (-inf, 92) AND ghazard = {a} AND gimpuls = <174.50, inf) AND goimpuls = <-72, inf) THEN class = {1}