Example usage for weka.experiment PropertyNode toString

List of usage examples for weka.experiment PropertyNode toString

Introduction

In this page you can find the example usage for weka.experiment PropertyNode toString.

Prototype

@Override
public String toString() 

Source Link

Document

Returns a string description of this property.

Usage

From source file:milk.experiment.MIExperiment.java

License:Open Source License

/**
   * Gets a string representation of the experiment configuration.
   */*from   w w w.j  ava2  s. c  o  m*/
   * @return a value of type 'String'
   */
  public String toString() {

      String result = "Runs from: " + m_RunLower + " to: " + m_RunUpper + '\n';
      result += "Datasets:";
      for (int i = 0; i < m_Datasets.size(); i++) {
          result += " " + m_Datasets.elementAt(i);
      }
      result += '\n';
      result += "Custom property iterator: " + (m_UsePropertyIterator ? "on" : "off") + "\n";
      if (m_UsePropertyIterator) {
          if (m_PropertyPath == null) {
              throw new Error("*** null propertyPath ***");
          }
          if (m_PropertyArray == null) {
              throw new Error("*** null propertyArray ***");
          }
          if (m_PropertyPath.length > 1) {
              result += "Custom property path:\n";
              for (int i = 0; i < m_PropertyPath.length - 1; i++) {
                  PropertyNode pn = m_PropertyPath[i];
                  result += "" + (i + 1) + "  " + pn.parentClass.getName() + "::" + pn.toString() + ' '
                          + pn.value.toString() + '\n';
              }
          }
          result += "Custom property name:" + m_PropertyPath[m_PropertyPath.length - 1].toString() + '\n';
          result += "Custom property values:\n";
          for (int i = 0; i < Array.getLength(m_PropertyArray); i++) {
              Object current = Array.get(m_PropertyArray, i);
              result += " " + (i + 1) + " " + current.getClass().getName() + " " + current.toString() + '\n';
          }
      }
      result += "ResultProducer: " + m_ResultProducer + '\n';
      result += "ResultListener: " + m_ResultListener + '\n';
      if (!getNotes().equals("")) {
          result += "Notes: " + getNotes();
      }
      return result;
  }