Package weka.classifiers.rules

Examples of weka.classifiers.rules.ZeroR



  protected void resetOptions () {
    m_trainInstances = null;
    m_Evaluation = null;
    m_BaseClassifier = new ZeroR();
    m_folds = 5;
    m_seed = 1;
    m_threshold = 0.01;
  }
View Full Code Here


    insts.deleteWithMissingClass();
   
    if (m_Classifier == null) {
      throw new Exception("No base classifier has been set!");
    }
    m_ZeroR = new ZeroR();
    m_ZeroR.buildClassifier(insts);

    m_TwoClassDataset = null;

    int numClassifiers = insts.numClasses();
View Full Code Here

  public UserClassifierTest(String name) { super(name)}

  /** Creates a default UserClassifier */
  public Classifier getClassifier() {
    return new ZeroR();
  }
View Full Code Here

   
    Random random = new Random(m_Seed);

    m_zeroR = null;
    if (data.numAttributes() == 1) {
      m_zeroR = new ZeroR();
      m_zeroR.buildClassifier(data);
      return;
    }

    // Randomize and stratify
View Full Code Here

  public double[] distributionForInstance(Instance instance) throws Exception {

    if (m_bestCommittee != null) return m_bestCommittee.distributionForInstance(instance);
    else {
      if (m_validationSetChanged || m_zeroR == null) {
  m_zeroR = new ZeroR();
  m_zeroR.buildClassifier(m_validationSet);
  m_validationSetChanged = false;
      }
      return m_zeroR.distributionForInstance(instance);
    }
View Full Code Here

    if (m_bestCommittee != null) {
      return m_bestCommittee.toString();
    } else {
      if ((m_validationSetChanged || m_zeroR == null) && m_validationSet != null
    && m_validationSet.numInstances() > 0) {
  m_zeroR = new ZeroR();
  try {
    m_zeroR.buildClassifier(m_validationSet);
  } catch (Exception e) {}
  m_validationSetChanged = false;
      }
View Full Code Here

  protected FilteredClassifier getFilteredClassifier() {
    FilteredClassifier   result;
   
    result = super.getFilteredClassifier();
    ((NominalToString) result.getFilter()).setAttributeIndexes("1");
    result.setClassifier(new ZeroR());
   
    return result;
  }
View Full Code Here


  protected void resetOptions () {
    m_trainInstances = null;
    m_Evaluation = null;
    m_BaseClassifier = new ZeroR();
    m_folds = 5;
    m_seed = 1;
    m_threshold = 0.01;
  }
View Full Code Here

   * reset to defaults
   */
  protected void resetOptions () {
    m_trainingInstances = null;
    m_Evaluation = null;
    m_Classifier = new ZeroR();
    m_holdOutFile = new File("Click to set hold out or test instances");
    m_holdOutInstances = null;
    m_useTraining = false;
  }
View Full Code Here

    m_NNSearch.setInstances(m_Train);

    // Invalidate any currently cross-validation selected k
    m_kNNValid = false;
   
    m_defaultModel = new ZeroR();
    m_defaultModel.buildClassifier(instances);
  }
View Full Code Here

TOP

Related Classes of weka.classifiers.rules.ZeroR

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.