From d8a0ed1e5efcadd9cfd4d58a8047eb2ed4a173ac Mon Sep 17 00:00:00 2001 From: agudys Date: Sat, 5 Oct 2024 00:10:46 +0200 Subject: [PATCH] Contrast set fix: group labels written in the log instead of numerical identifiers. --- adaa.analytics.rules/build.gradle | 2 +- .../rules/logic/representation/ContrastSurvivalRuleSet.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/adaa.analytics.rules/build.gradle b/adaa.analytics.rules/build.gradle index 0fcf862..0c8e1d6 100644 --- a/adaa.analytics.rules/build.gradle +++ b/adaa.analytics.rules/build.gradle @@ -27,7 +27,7 @@ codeQuality { } sourceCompatibility = 1.8 -version = '1.7.20' +version = '1.7.21' jar { diff --git a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/representation/ContrastSurvivalRuleSet.java b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/representation/ContrastSurvivalRuleSet.java index a18f44c..e202705 100644 --- a/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/representation/ContrastSurvivalRuleSet.java +++ b/adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/representation/ContrastSurvivalRuleSet.java @@ -62,13 +62,16 @@ public String toString() { sb.append(super.toString()); sb.append("\nEstimator:\n"); + IContrastExampleSet ces = (IContrastExampleSet)trainingSet; + List groups = ces.getContrastAttribute().getMapping().getValues(); + // get times from training estimator ArrayList times = trainingEstimator.getTimes(); // build header sb.append("time,entire-set"); for (int i = 0; i < groupEstimators.size(); ++i) { - sb.append(",group-" + (i + 1)); + sb.append(",group-" + groups.get(i)); } for (int i = 0; i < rules.size(); ++i) {