Package weka.core

Examples of weka.core.Instances.compactify()


      }
      // free memory
      subsets[i] = null;
    }
    train.compactify();
    test.compactify();
   
    // randomize the final sets
    train.randomize(rand);
    test.randomize(rand);
  } else {
View Full Code Here


    data.add(subsets[i].instance(k));
  }
  for (int k = 0; k < subsets[j].numInstances(); k++) {
    data.add(subsets[j].instance(k));
  }
  data.compactify();
  data.randomize(rand);
  m_classifiers[i][j].buildClassifier(data, i, j,
              m_fitLogisticModels,
              m_numFolds, m_randomSeed);
      }
View Full Code Here

              }
            }
          }
        }
      }
      sub.compactify();
      return sub;
    }

    /**
     * Evaluate a numeric attribute for a potential split
View Full Code Here

    } else {
      rightSubset.add(m_instances.instance(i));
    }
  }

  leftSubset.compactify();
  rightSubset.compactify();

  // build left and right nodes
  m_left = new RuleNode(m_globalDeviation, m_globalAbsDeviation, this);
  m_left.setMinNumInstances(m_splitNum);
View Full Code Here

          data.add(subsets[i].instance(k));
        }
        for (int k = 0; k < subsets[j].numInstances(); k++) {
          data.add(subsets[j].instance(k));
       
        data.compactify();
        data.randomize(rand);
        m_classifiers[i][j].buildClassifier(data, i, j,
            m_fitLogisticModels,
            m_numFolds, m_randomSeed);
      }
View Full Code Here

    data.add(subsets[i].instance(k));
  }
  for (int k = 0; k < subsets[j].numInstances(); k++) {
    data.add(subsets[j].instance(k));
  }
  data.compactify();
  data.randomize(rand);
  m_classifiers[i][j].buildClassifier(data, i, j,
              m_fitLogisticModels,
              m_numFolds, m_randomSeed);
      }
View Full Code Here

      // create the new Instances
      Instances dataSet = new Instances(m_structure, m_batch.size());
      for (Instance i : m_batch) {
        dataSet.add(i);
      }
      dataSet.compactify();
     
      // save memory
      m_batch = null;
     
      if (m_log != null) {
View Full Code Here

    } else {
      rightSubset.add(m_instances.instance(i));
    }
  }

  leftSubset.compactify();
  rightSubset.compactify();

  // build left and right nodes
  m_left = new RuleNode(m_globalDeviation, m_globalAbsDeviation, this);
  m_left.setMinNumInstances(m_splitNum);
View Full Code Here

      }
      // free memory
      subsets[i] = null;
    }
    train.compactify();
    test.compactify();
   
    // randomize the final sets
    train.randomize(rand);
    test.randomize(rand);
  } else {
View Full Code Here

        if (passesMustContain(data.instance(i),
            transactionsMustContainIndexes, numInTransactionsMustContainList)) {
          newInsts.add(data.instance(i));
        }
      }
      newInsts.compactify();
      return newInsts;
    }
  }
 
  private ArrayList<Item> parseRulesMustContain(Instances data) {
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.