Package weka.experiment.xml

Examples of weka.experiment.xml.XMLExperiment


    if ( (KOML.isPresent()) && (filename.toLowerCase().endsWith(KOML.FILE_EXTENSION)) ) {
      result = (Experiment) KOML.read(filename);
    }
    // XML?
    else if (filename.toLowerCase().endsWith(".xml")) {
      XMLExperiment xml = new XMLExperiment();
      result = (Experiment) xml.read(filename);
    }
    // binary
    else {
      FileInputStream fi = new FileInputStream(filename);
      ObjectInputStream oi = new ObjectInputStream(
View Full Code Here


    if ( (KOML.isPresent()) && (filename.toLowerCase().endsWith(KOML.FILE_EXTENSION)) ) {
      KOML.write(filename, exp);
    }
    // XML?
    else if (filename.toLowerCase().endsWith(".xml")) {
      XMLExperiment xml = new XMLExperiment();
      xml.write(filename, exp);
    }
    // binary
    else {
      FileOutputStream fo = new FileOutputStream(filename);
      ObjectOutputStream oo = new ObjectOutputStream(
View Full Code Here

            exp = (Experiment) KOML.read(expFile);
         }
         else
         // XML?
         if (expFile.toLowerCase().endsWith(".xml")) {
            XMLExperiment xml = new XMLExperiment();
            exp = (Experiment) xml.read(expFile);
         }
         // binary
         else {
            FileInputStream fi = new FileInputStream(expFile);
            ObjectInputStream oi = new ObjectInputStream(
                                   new BufferedInputStream(fi));
            exp = (Experiment)oi.readObject();
            oi.close();
         }

  // allow extra datasets to be added to pre-loaded experiment from command line
  String dataName;
  do {
    dataName = Utils.getOption('T', args);
    if (dataName.length() != 0) {
      File dataset = new File(dataName);
      exp.getDatasets().addElement(dataset);
    }
  } while (dataName.length() != 0);
 
      }
      System.err.println("Experiment:\n" + exp.toString());

      if (saveFile.length() != 0) {
         // KOML?
         if ( (KOML.isPresent()) && (saveFile.toLowerCase().endsWith(KOML.FILE_EXTENSION)) ) {
            KOML.write(saveFile, exp);
         }
         else
         // XML?
         if (saveFile.toLowerCase().endsWith(".xml")) {
            XMLExperiment xml = new XMLExperiment();
            xml.write(saveFile, exp);
         }
         // binary
         else {
            FileOutputStream fo = new FileOutputStream(saveFile);
            ObjectOutputStream oo = new ObjectOutputStream(
View Full Code Here

            tmp = KOML.read(expFile);
         }
         else
         // XML?
         if (expFile.toLowerCase().endsWith(".xml")) {
            XMLExperiment xml = new XMLExperiment();
            tmp = xml.read(expFile);
         }
         // binary
         else {
            FileInputStream fi = new FileInputStream(expFile);
            ObjectInputStream oi = new ObjectInputStream(
                                   new BufferedInputStream(fi));
            tmp = oi.readObject();
            oi.close();
         }
  if (tmp instanceof RemoteExperiment) {
    exp = (RemoteExperiment)tmp;
  } else {
    base = (Experiment)tmp;
  }
      }
      if (base != null) {
  exp = new RemoteExperiment(base);
      }
      for (int i=0;i<remoteHosts.size();i++) {
  exp.addRemoteHost((String)remoteHosts.elementAt(i));
      }
      System.err.println("Experiment:\n" + exp.toString());

      if (saveFile.length() != 0) {
         // KOML?
         if ( (KOML.isPresent()) && (saveFile.toLowerCase().endsWith(KOML.FILE_EXTENSION)) ) {
            KOML.write(saveFile, exp);
         }
         else
         // XML?
         if (saveFile.toLowerCase().endsWith(".xml")) {
            XMLExperiment xml = new XMLExperiment();
            xml.write(saveFile, exp);
         }
         // binary
         else {
            FileOutputStream fo = new FileOutputStream(saveFile);
            ObjectOutputStream oo = new ObjectOutputStream(
View Full Code Here

         exp = (Experiment) KOML.read(expFile.getAbsolutePath());
      }
      else
      // XML?
      if (expFile.getAbsolutePath().toLowerCase().endsWith(".xml")) {
         XMLExperiment xml = new XMLExperiment();
         exp = (Experiment) xml.read(expFile);
      }
      // binary
      else {
         FileInputStream fi = new FileInputStream(expFile);
         ObjectInputStream oi = new ObjectInputStream(
View Full Code Here

         KOML.write(expFile.getAbsolutePath(), m_Exp);
      }
      else
      // XML?
      if (expFile.getAbsolutePath().toLowerCase().endsWith(".xml")) {
         XMLExperiment xml = new XMLExperiment();
         xml.write(expFile, m_Exp);
      }
      // binary
      else {
         FileOutputStream fo = new FileOutputStream(expFile);
         ObjectOutputStream oo = new ObjectOutputStream(
View Full Code Here

         exp = (Experiment) KOML.read(expFile.getAbsolutePath());
      }
      else
      // XML?
      if (expFile.getAbsolutePath().toLowerCase().endsWith(".xml")) {
         XMLExperiment xml = new XMLExperiment();
         exp = (Experiment) xml.read(expFile);
      }
      // binary
      else {
         FileInputStream fi = new FileInputStream(expFile);
         ObjectInputStream oi = new ObjectInputStream(
View Full Code Here

          KOML.write(expFile.getAbsolutePath(), m_Exp);
       }
       else
       // XML?
       if (expFile.getAbsolutePath().toLowerCase().endsWith(".xml")) {
          XMLExperiment xml = new XMLExperiment();
          xml.write(expFile, m_Exp);
       }
       // binary
       else {
          FileOutputStream fo = new FileOutputStream(expFile);
          ObjectOutputStream oo = new ObjectOutputStream(
View Full Code Here

    if ( (KOML.isPresent()) && (filename.toLowerCase().endsWith(KOML.FILE_EXTENSION)) ) {
      result = (Experiment) KOML.read(filename);
    }
    // XML?
    else if (filename.toLowerCase().endsWith(".xml")) {
      XMLExperiment xml = new XMLExperiment();
      result = (Experiment) xml.read(filename);
    }
    // binary
    else {
      FileInputStream fi = new FileInputStream(filename);
      ObjectInputStream oi = new ObjectInputStream(
View Full Code Here

    if ( (KOML.isPresent()) && (filename.toLowerCase().endsWith(KOML.FILE_EXTENSION)) ) {
      KOML.write(filename, exp);
    }
    // XML?
    else if (filename.toLowerCase().endsWith(".xml")) {
      XMLExperiment xml = new XMLExperiment();
      xml.write(filename, exp);
    }
    // binary
    else {
      FileOutputStream fo = new FileOutputStream(filename);
      ObjectOutputStream oo = new ObjectOutputStream(
View Full Code Here

TOP

Related Classes of weka.experiment.xml.XMLExperiment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.