Package weka.experiment

Examples of weka.experiment.Experiment


  public static void main(String [] args) {

    try {
      final JFrame jf = new JFrame(Messages.getInstance().getString("RunNumberPanel_Main_JFrame_Text"));
      jf.getContentPane().setLayout(new BorderLayout());
      jf.getContentPane().add(new RunNumberPanel(new Experiment()),
            BorderLayout.CENTER);
      jf.addWindowListener(new WindowAdapter() {
  public void windowClosing(WindowEvent e) {
    jf.dispose();
    System.exit(0);
View Full Code Here


      jf.pack();
      jf.setVisible(true);
      System.err.println(Messages.getInstance().getString("DatasetListPanel_Main_Error_Text_First"));
      Thread.currentThread().sleep(3000);
      System.err.println(Messages.getInstance().getString("DatasetListPanel_Main_Error_Text_Second"));
      dp.setExperiment(new Experiment());
    } catch (Exception ex) {
      ex.printStackTrace();
      System.err.println(ex.getMessage());
    }
  }
View Full Code Here

   */
  public static void main(String [] args) {
    try {
      final JFrame jf = new JFrame(Messages.getInstance().getString("DistributeExperimentPanel_Main_JFrame_Text"));
      jf.getContentPane().setLayout(new BorderLayout());
      jf.getContentPane().add(new DistributeExperimentPanel(new Experiment()),
            BorderLayout.CENTER);
      jf.addWindowListener(new WindowAdapter() {
  public void windowClosing(WindowEvent e) {
    jf.dispose();
    System.exit(0);
View Full Code Here

  });       

    m_NewBut.setMnemonic('N');
    m_NewBut.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
  setExperiment(new Experiment());
      }
    });
    m_SaveBut.setMnemonic('S');
    m_SaveBut.setEnabled(false);
    m_SaveBut.addActionListener(new ActionListener() {
View Full Code Here

      if (!expFile.getName().toLowerCase().endsWith(".xml"))
        expFile = new File(expFile.getParent(), expFile.getName() + ".xml");
    }
   
    try {
      Experiment exp = Experiment.read(expFile.getAbsolutePath());
      setExperiment(exp);
      System.err.println(Messages.getInstance().getString("SetupPanel_OpenExperiment_Error_Text") + m_Exp);
    } catch (Exception ex) {
      ex.printStackTrace();
      JOptionPane.showMessageDialog(this, Messages.getInstance().getString("SetupPanel_OpenExperiment_Exception_JOptionPaneShowMessageDialog_Text_First")
View Full Code Here

      final boolean writeExp = Utils.getFlag('s', args);
      final String expFile = Utils.getOption('f', args);
      if ((readExp || writeExp) && (expFile.length() == 0)) {
  throw new Exception(Messages.getInstance().getString("SetupPanel_Main_Exception_Text"));
      }
      Experiment exp = null;
      if (readExp) {
  FileInputStream fi = new FileInputStream(expFile);
  ObjectInputStream oi = new ObjectInputStream(
             new BufferedInputStream(fi));
  exp = (Experiment)oi.readObject();
  oi.close();
      } else {
  exp = new Experiment();
      }
      System.err.println(Messages.getInstance().getString("SetupPanel_Main_Error_Text_First") + exp.toString());
      final JFrame jf = new JFrame(Messages.getInstance().getString("SetupPanel_Main_JFrame_Text"));
      jf.getContentPane().setLayout(new BorderLayout());
      final SetupPanel sp = new SetupPanel();
      //sp.setBorder(BorderFactory.createTitledBorder("Setup"));
      jf.getContentPane().add(sp, BorderLayout.CENTER);
View Full Code Here

      boolean readExp = Utils.getFlag('l', args);
      final String expFile = Utils.getOption('f', args);
      if (readExp && (expFile.length() == 0)) {
  throw new Exception(Messages.getInstance().getString("RunPanel_ExperimentRunner_Main_Exception_Text"));
      }
      Experiment exp = null;
      if (readExp) {
  FileInputStream fi = new FileInputStream(expFile);
  ObjectInputStream oi = new ObjectInputStream(
             new BufferedInputStream(fi));
  Object to = oi.readObject();
  if (to instanceof RemoteExperiment) {
    exp = (RemoteExperiment)to;
  } else {
    exp = (Experiment)to;
  }
  oi.close();
      } else {
  exp = new Experiment();
      }
      System.err.println(Messages.getInstance().getString("RunPanel_ExperimentRunner_Main_Error_Text_First") + exp.toString());
      final JFrame jf = new JFrame(Messages.getInstance().getString("RunPanel_ExperimentRunner_Main_JFrame_Text"));
      jf.getContentPane().setLayout(new BorderLayout());
      final RunPanel sp = new RunPanel(exp);
      //sp.setBorder(BorderFactory.createTitledBorder("Setup"));
      jf.getContentPane().add(sp, BorderLayout.CENTER);
View Full Code Here

      jf.pack();
      jf.setVisible(true);
      System.err.println(Messages.getInstance().getString("AlgorithmListPanel_Main_Error_Text_First"));
      Thread.currentThread().sleep(3000);
      System.err.println(Messages.getInstance().getString("AlgorithmListPanel_Main_Error_Text_Second"));
      dp.setExperiment(new Experiment());
    } catch (Exception ex) {
      ex.printStackTrace();
      System.err.println(ex.getMessage());
    }
  }
View Full Code Here

    // create action listeners
    m_NewBut.setMnemonic('N');
    m_NewBut.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent e) {
    Experiment newExp = new Experiment();
    CrossValidationResultProducer cvrp = new CrossValidationResultProducer();
    cvrp.setNumFolds(10);
    cvrp.setSplitEvaluator(new ClassifierSplitEvaluator());
    newExp.setResultProducer(cvrp);
    newExp.setPropertyArray(new Classifier[0]);
    newExp.setUsePropertyIterator(true);
    setExperiment(newExp);

          // defaults
          if (ExperimenterDefaults.getUseClassification())
            m_ExpClassificationRBut.setSelected(true);
View Full Code Here

      if (!expFile.getName().toLowerCase().endsWith(".xml"))
        expFile = new File(expFile.getParent(), expFile.getName() + ".xml");
    }
   
    try {
      Experiment exp = Experiment.read(expFile.getAbsolutePath());
      if (!setExperiment(exp)) {
  if (m_modePanel != null) m_modePanel.switchToAdvanced(exp);
      }
      System.err.println(Messages.getInstance().getString("SimpleSetupPanel_OpenExperiment_Exception_JOptionPaneShowMessageDialog_Text") + exp);
    } catch (Exception ex) {
View Full Code Here

TOP

Related Classes of weka.experiment.Experiment

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.