示例#1
0
 /** Prints the classifier. */
 public void print() {
   System.out.print("  Act: " + action + "   Conf:  ");
   for (int i = 0; i < rep.length; i++) {
     rep[i].print();
   }
   if (parameters != null) parameters.print();
 } // end print
示例#2
0
 /**
  * Prints the classifier to the specified file.
  *
  * @param fout is the file output where the classifier has to be printed.
  */
 public void print(PrintWriter fout) {
   fout.print(" ");
   for (int i = 0; i < rep.length; i++) {
     rep[i].print(fout);
   }
   fout.print("  " + action + "  ");
   if (parameters != null) parameters.print(fout);
 }
示例#3
0
  /**
   * Prints the desnormalized classifier to the specified file.
   *
   * @param fout is the file output where the classifier has to be printed.
   */
  public void printNotNorm(PrintWriter fout) {
    int i = 0;
    fout.print(" ");
    try {
      for (i = 0; i < rep.length; i++) {
        if (Config.typeOfAttributes[i].equals("ternary")) {
          rep[i].print(fout);
        } else if (Config.typeOfAttributes[i].equals("integer")) {
          rep[i].printNotNorm(fout, Config.attBounds[i][0]);
        } else if (Config.typeOfAttributes[i].equals("real")) {
          rep[i].printNotNorm(fout, Config.attBounds[i][0], Config.attBounds[i][1]);
        }
      }
    } catch (Exception e) {
      System.out.println("Exception when printing the attribute: " + i);
      e.printStackTrace();
    }
    fout.print("\t " + (String) Config.classConv.elementAt(action));

    if (parameters != null) parameters.print(fout);
  }
示例#4
0
 /**
  * Prints the desnormalized classifier to the specified file.
  *
  * @param fout is the file output where the classifier has to be printed.
  */
 public void printNotNorm(PrintWriter fout) {
   rep.printNotNorm(fout);
   if (parameters != null) parameters.print(fout);
 }
示例#5
0
 /** Prints the classifier. */
 public void print() {
   rep.print();
   if (parameters != null) parameters.print();
 }