Package weka.core

Examples of weka.core.FastVector.elements()


   * @return       true, if the Sequnce is subsequence of the data
   *         sequence, else false
   */
  protected boolean isSubsequenceOf(Instances dataSequence) {
    FastVector elements = getElements();
    Enumeration elementEnum = elements.elements();
    Element curElement = (Element) elementEnum.nextElement();

    for (int i = 0; i < dataSequence.numInstances(); i++) {
      if (curElement.isContainedBy(dataSequence.instance(i))) {
  if (!elementEnum.hasMoreElements()) {
View Full Code Here


            "-N <required number of rules output>"));
    newVector.addElement(new Option(string2, "A", 0,
            "-A"));
    newVector.addElement(new Option(string3, "c", 1,
            "-c <the class index>"));
    return newVector.elements();
  }

/**
   * Parses a given list of options. <p/>
View Full Code Here

    RuleGeneration currentItemSet;
   
    // Build rules
    for (int j = 0; j < m_Ls.size(); j++) {
      FastVector currentItemSets = (FastVector)m_Ls.elementAt(j);
      Enumeration enumItemSets = currentItemSets.elements();
      while (enumItemSets.hasMoreElements()) {
        currentItemSet = new RuleGeneration((ItemSet)enumItemSets.nextElement());
        m_best = currentItemSet.generateRules(m_numRules-5, m_midPoints,m_priors,m_expectation,
                                        m_instances,m_best,m_count);
         
View Full Code Here

   
    CaRuleGeneration currentLItemSet;
    // Build rules
    for (int j = 0; j < m_Ls.size(); j++) {
      FastVector currentItemSets = (FastVector)m_Ls.elementAt(j);
      Enumeration enumItemSets = currentItemSets.elements();
      while (enumItemSets.hasMoreElements()) {
        currentLItemSet = new CaRuleGeneration((ItemSet)enumItemSets.nextElement());
        m_best = currentLItemSet.generateRules(m_numRules-5, m_midPoints,m_priors,m_expectation,
                                        m_instances,m_best,m_count);
        m_count = currentLItemSet.count();
View Full Code Here

    newVector.addElement(new Option(string9, "A", 0,
            "-A"));
    newVector.addElement(new Option(string10, "c", 1,
            "-c <the class index>"));
   
    return newVector.elements();
  }

  /**
   * Parses a given list of options. <p/>
   *
 
View Full Code Here

    FastVector[] rules;

    // Build rules
    for (int j = 1; j < m_Ls.size(); j++) {
      FastVector currentItemSets = (FastVector)m_Ls.elementAt(j);
      Enumeration enumItemSets = currentItemSets.elements();
      while (enumItemSets.hasMoreElements()) {
  AprioriItemSet currentItemSet = (AprioriItemSet)enumItemSets.nextElement();
        //AprioriItemSet currentItemSet = new AprioriItemSet((ItemSet)enumItemSets.nextElement());
  rules=currentItemSet.generateRulesBruteForce(m_minMetric,m_metricType,
          m_hashtables,j+1,
View Full Code Here

    FastVector[] rules;

    // Build rules
    for (int j = 1; j < m_Ls.size(); j++) {
      FastVector currentItemSets = (FastVector)m_Ls.elementAt(j);
      Enumeration enumItemSets = currentItemSets.elements();
      while (enumItemSets.hasMoreElements()) {
  AprioriItemSet currentItemSet = (AprioriItemSet)enumItemSets.nextElement();
        //AprioriItemSet currentItemSet = new AprioriItemSet((ItemSet)enumItemSets.nextElement());
  rules = currentItemSet.generateRules(m_minMetric, m_hashtables, j + 1);
  for (int k = 0; k < rules[0].size(); k++) {
View Full Code Here

    FastVector[] rules;

    // Build rules
    for (int j = 0; j < m_Ls.size(); j++) {
      FastVector currentLabeledItemSets = (FastVector)m_Ls.elementAt(j);
      Enumeration enumLabeledItemSets = currentLabeledItemSets.elements();
      while (enumLabeledItemSets.hasMoreElements()) {
  LabeledItemSet currentLabeledItemSet = (LabeledItemSet)enumLabeledItemSets.nextElement();
  rules = currentLabeledItemSet.generateRules(m_minMetric,false);
  for (int k = 0; k < rules[0].size(); k++) {
    m_allTheRules[0].addElement(rules[0].elementAt(k));
View Full Code Here

    result.addElement(new Option(
  "The class index",
  "c", 1, "-c <the class index>"));
   
    return result.elements();
  }

  /**
   * Parses a given list of options. <p/>
View Full Code Here

     newVector.addElement(new Option(
   "\tSets incremental loading",
   "I", 0, "-I"));
    
     return  newVector.elements();
  }
 
  /**
   * Sets the options.
   *
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.