Example #1
0
 ///////////////////////////////////////////////////////
 // Saving and loading models
 ///////////////////////////////////////////////////////
 public void saveModel(String file) throws IOException {
   ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(file));
   out.writeObject(params.parameters);
   out.writeObject(pipe.dataAlphabet);
   out.writeObject(pipe.typeAlphabet);
   out.close();
 }
Example #2
0
  ///////////////////////////////////////////////////////
  // Saving and loading models
  ///////////////////////////////////////////////////////
  public void saveModel(String file) throws IOException {
    ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(file));
    out.writeObject(params.parameters);
    out.writeObject(pipe.dataAlphabet);
    out.writeObject(pipe.typeAlphabet);

    // afm 06-04-08
    if (options.separateLab) {
      out.writeObject(classifier);
    }

    out.close();
  }