Package weka.experiment

Examples of weka.experiment.CrossValidationResultProducer


    // 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);
View Full Code Here


    m_ResultsDestinationCBox.setEnabled(true);
    m_ResultsDestinationPathLabel.setEnabled(true);
    m_ResultsDestinationPathTField.setEnabled(true);

    if (exp.getResultProducer() instanceof CrossValidationResultProducer) {
      CrossValidationResultProducer cvrp = (CrossValidationResultProducer) exp.getResultProducer();
      m_numFolds = cvrp.getNumFolds();
      m_ExperimentParameterTField.setText("" + m_numFolds);
     
      if (cvrp.getSplitEvaluator() instanceof ClassifierSplitEvaluator) {
  m_ExpClassificationRBut.setSelected(true);
  m_ExpRegressionRBut.setSelected(false);
      } else if (cvrp.getSplitEvaluator() instanceof RegressionSplitEvaluator) {
  m_ExpClassificationRBut.setSelected(false);
  m_ExpRegressionRBut.setSelected(true);
      } else {
  // unknown split evaluator
  System.out.println(Messages.getInstance().getString("SimpleSetupPanel_SetExperiment_UnknownSplitEvaluator_Text"));
View Full Code Here

      sec = ((RegressionSplitEvaluator)se).getClassifier();
    }
   
    // build new ResultProducer
    if (m_ExperimentTypeCBox.getSelectedItem() == TYPE_CROSSVALIDATION_TEXT) {
      CrossValidationResultProducer cvrp = new CrossValidationResultProducer();
      cvrp.setNumFolds(m_numFolds);
      cvrp.setSplitEvaluator(se);
     
      PropertyNode[] propertyPath = new PropertyNode[2];
      try {
  propertyPath[0] = new PropertyNode(se, new PropertyDescriptor("splitEvaluator",
                      CrossValidationResultProducer.class),
View Full Code Here

    }

    if (m_ExperimentTypeCBox.getSelectedItem() == TYPE_CROSSVALIDATION_TEXT) {

      if (m_Exp.getResultProducer() instanceof CrossValidationResultProducer) {
  CrossValidationResultProducer cvrp = (CrossValidationResultProducer) m_Exp.getResultProducer();
  cvrp.setNumFolds(m_numFolds);
      } else {
  return;
      }

    } else {
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);
View Full Code Here

    m_ResultsDestinationCBox.setEnabled(true);
    m_ResultsDestinationPathLabel.setEnabled(true);
    m_ResultsDestinationPathTField.setEnabled(true);

    if (exp.getResultProducer() instanceof CrossValidationResultProducer) {
      CrossValidationResultProducer cvrp = (CrossValidationResultProducer) exp.getResultProducer();
      m_numFolds = cvrp.getNumFolds();
      m_ExperimentParameterTField.setText("" + m_numFolds);
     
      if (cvrp.getSplitEvaluator() instanceof ClassifierSplitEvaluator) {
  m_ExpClassificationRBut.setSelected(true);
  m_ExpRegressionRBut.setSelected(false);
      } else if (cvrp.getSplitEvaluator() instanceof RegressionSplitEvaluator) {
  m_ExpClassificationRBut.setSelected(false);
  m_ExpRegressionRBut.setSelected(true);
      } else {
  // unknown split evaluator
  System.out.println("SimpleSetup incompatibility: unrecognised split evaluator");
View Full Code Here

      sec = ((RegressionSplitEvaluator)se).getClassifier();
    }
   
    // build new ResultProducer
    if (m_ExperimentTypeCBox.getSelectedItem() == TYPE_CROSSVALIDATION_TEXT) {
      CrossValidationResultProducer cvrp = new CrossValidationResultProducer();
      cvrp.setNumFolds(m_numFolds);
      cvrp.setSplitEvaluator(se);
     
      PropertyNode[] propertyPath = new PropertyNode[2];
      try {
  propertyPath[0] = new PropertyNode(se, new PropertyDescriptor("splitEvaluator",
                      CrossValidationResultProducer.class),
View Full Code Here

    }

    if (m_ExperimentTypeCBox.getSelectedItem() == TYPE_CROSSVALIDATION_TEXT) {

      if (m_Exp.getResultProducer() instanceof CrossValidationResultProducer) {
  CrossValidationResultProducer cvrp = (CrossValidationResultProducer) m_Exp.getResultProducer();
  cvrp.setNumFolds(m_numFolds);
      } else {
  return;
      }

    } else {
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);
View Full Code Here

    m_ResultsDestinationCBox.setEnabled(true);
    m_ResultsDestinationPathLabel.setEnabled(true);
    m_ResultsDestinationPathTField.setEnabled(true);

    if (exp.getResultProducer() instanceof CrossValidationResultProducer) {
      CrossValidationResultProducer cvrp = (CrossValidationResultProducer) exp.getResultProducer();
      m_numFolds = cvrp.getNumFolds();
      m_ExperimentParameterTField.setText("" + m_numFolds);
     
      if (cvrp.getSplitEvaluator() instanceof ClassifierSplitEvaluator) {
  m_ExpClassificationRBut.setSelected(true);
  m_ExpRegressionRBut.setSelected(false);
      } else if (cvrp.getSplitEvaluator() instanceof RegressionSplitEvaluator) {
  m_ExpClassificationRBut.setSelected(false);
  m_ExpRegressionRBut.setSelected(true);
      } else {
  // unknown split evaluator
  System.out.println("SimpleSetup incompatibility: unrecognised split evaluator");
View Full Code Here

TOP

Related Classes of weka.experiment.CrossValidationResultProducer

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.