Skip to content

Commit c2a3b1d

Browse files
committed
Contrast set fix: group labels written in the log instead of numerical identifiers.
1 parent 84c9bbd commit c2a3b1d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

adaa.analytics.rules/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
id 'java'
66
}
77

8-
version = '2.1.19'
8+
version = '2.1.20'
99
java {
1010
sourceCompatibility = JavaVersion.VERSION_1_8
1111
}

adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/representation/ruleset/ContrastSurvivalRuleSet.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,17 @@ public String toString() {
6262
// get times from training estimator
6363
ArrayList<Double> times = trainingEstimator.getTimes();
6464

65+
ContrastSurvivalExampleSet ces = (ContrastSurvivalExampleSet)getTrainingHeader();
66+
List<String> groups = ces.getContrastAttribute().getMapping().getValues();
67+
6568
// build header
6669
sb.append("time,entire-set");
6770
for (int i = 0; i < groupEstimators.size(); ++i) {
68-
sb.append(",group-" + (i + 1));
71+
sb.append(",group-" + groups.get(i));
6972
}
7073

7174
for (int i = 0; i < rules.size(); ++i) {
72-
sb.append(",cs-" + (i + 1));
75+
sb.append(",cs-" + (i+1));
7376
}
7477
sb.append("\n");
7578

0 commit comments

Comments
 (0)