temp.append(pad("conf", " ", maxConfWidth, true) + " ");
}
temp.append(pad("error", " ", maxColWidth, true) + "\n");
for (int i = 0; i < preds.size(); i++) {
NumericPrediction pred = preds.get(i);
String instNum = pad("" + (instanceNumberOffset + i + stepAhead), " ",
maxColWidth, true);
temp.append(instNum + " ");
double actual = pred.actual();
String actualS = null;
if (Utils.isMissingValue(actual)) {
actualS = pad("?", " ", maxColWidth, true);
} else {
actualS = Utils.doubleToString(actual, 4);
actualS = pad(actualS, " ", maxColWidth, true);
}
temp.append(actualS + " ");
double predicted = pred.predicted();
String predictedS = null;
if (Utils.isMissingValue(predicted)) {
predictedS = pad("?", " ", maxColWidth, true);
} else {
predictedS = Utils.doubleToString(predicted, 4);
predictedS = pad(predictedS, " ", maxColWidth, true);
}
temp.append(predictedS + " ");
if (hasConfidenceIntervals) {
double[][] limits = pred.predictionIntervals();
double low = limits[0][0];
double high = limits[0][1];
String limitsS = Utils.doubleToString(low, 3) + ":"
+ Utils.doubleToString(high, 3);
limitsS = pad(limitsS, " ", maxConfWidth, true);
temp.append(limitsS).append(" ");
}
double error = pred.error();
String errorS = null;
if (Utils.isMissingValue(error)) {
errorS = pad("?", " ", maxColWidth, true);
} else {
errorS = Utils.doubleToString(error, 4);