public String [] getResultNames() {
    int addm = (m_AdditionalMeasures != null) 
      ? m_AdditionalMeasures.length 
      : 0;
    int overall_length = RESULT_SIZE+addm;
    overall_length += NUM_IR_STATISTICS;
    overall_length += NUM_WEIGHTED_IR_STATISTICS;
    overall_length += NUM_UNWEIGHTED_IR_STATISTICS;
    if (getAttributeID() >= 0) overall_length += 1;
    if (getPredTargetColumn()) overall_length += 2;

    String [] resultNames = new String[overall_length];
    int current = 0;
    resultNames[current++] = "Number_of_training_instances";
    resultNames[current++] = "Number_of_testing_instances";

    // Basic performance stats - right vs wrong
    resultNames[current++] = "Number_correct";
    resultNames[current++] = "Number_incorrect";
    resultNames[current++] = "Number_unclassified";
    resultNames[current++] = "Percent_correct";
    resultNames[current++] = "Percent_incorrect";
    resultNames[current++] = "Percent_unclassified";
    resultNames[current++] = "Kappa_statistic";

    // Sensitive stats - certainty of predictions
    resultNames[current++] = "Mean_absolute_error";
    resultNames[current++] = "Root_mean_squared_error";
    resultNames[current++] = "Relative_absolute_error";
    resultNames[current++] = "Root_relative_squared_error";

    // SF stats
    resultNames[current++] = "SF_prior_entropy";
    resultNames[current++] = "SF_scheme_entropy";
    resultNames[current++] = "SF_entropy_gain";
    resultNames[current++] = "SF_mean_prior_entropy";
    resultNames[current++] = "SF_mean_scheme_entropy";
    resultNames[current++] = "SF_mean_entropy_gain";

    // K&B stats
    resultNames[current++] = "KB_information";
    resultNames[current++] = "KB_mean_information";
    resultNames[current++] = "KB_relative_information";

    // IR stats
    resultNames[current++] = "True_positive_rate";
    resultNames[current++] = "Num_true_positives";
    resultNames[current++] = "False_positive_rate";
    resultNames[current++] = "Num_false_positives";
    resultNames[current++] = "True_negative_rate";
    resultNames[current++] = "Num_true_negatives";
    resultNames[current++] = "False_negative_rate";
    resultNames[current++] = "Num_false_negatives";
    resultNames[current++] = "IR_precision";
    resultNames[current++] = "IR_recall";
    resultNames[current++] = "F_measure";
    resultNames[current++] = "Area_under_ROC";
    
    // Weighted IR stats
    resultNames[current++] = "Weighted_avg_true_positive_rate";
    resultNames[current++] = "Weighted_avg_false_positive_rate";
    resultNames[current++] = "Weighted_avg_true_negative_rate";
    resultNames[current++] = "Weighted_avg_false_negative_rate";
    resultNames[current++] = "Weighted_avg_IR_precision";
    resultNames[current++] = "Weighted_avg_IR_recall";
    resultNames[current++] = "Weighted_avg_F_measure";
    resultNames[current++] = "Weighted_avg_area_under_ROC";
    
    // Unweighted IR stats
    resultNames[current++] = "Unweighted_macro_avg_F_measure";
    resultNames[current++] = "Unweighted_micro_avg_F_measure";
    
    // Timing stats
    resultNames[current++] = "Elapsed_Time_training";
    resultNames[current++] = "Elapsed_Time_testing";
    resultNames[current++] = "UserCPU_Time_training";
    resultNames[current++] = "UserCPU_Time_testing";

    // sizes
    resultNames[current++] = "Serialized_Model_Size";
    resultNames[current++] = "Serialized_Train_Set_Size";
    resultNames[current++] = "Serialized_Test_Set_Size";
    
    // ID/Targets/Predictions
    if (getAttributeID() >= 0) resultNames[current++] = "Instance_ID";
    if (getPredTargetColumn()){
        resultNames[current++] = "Targets";
        resultNames[current++] = "Predictions";
    }
    
    // Classifier defined extras
    resultNames[current++] = "Summary";
    // add any additional measures
    for (int i=0;i<addm;i++) {
      resultNames[current++] = m_AdditionalMeasures[i];
    }
    if (current != overall_length) {
      throw new Error("ResultNames didn't fit RESULT_SIZE");
    }
    return resultNames;
  }