Package weka.core

Examples of weka.core.Attribute.copy()


     
    newAtts = new FastVector(getInputFormat().numAttributes());
    for (int j = 0; j < getInputFormat().numAttributes(); j++) {
      Attribute att = getInputFormat().attribute(j);
      if (j != m_AttIndex.getIndex()) {
  newAtts.addElement(att.copy());
      } else {
   
  // Compute new value
   
  if (att.value(m_FirstIndex.getIndex()).endsWith("'")) {
View Full Code Here


    // Compute new attributes
    newAtts = new FastVector(getInputFormat().numAttributes());
    for (int j = 0; j < getInputFormat().numAttributes(); j++) {
      Attribute att = getInputFormat().attribute(j);
      if (j != m_AttIndex.getIndex()) {
  newAtts.addElement(att.copy());
      } else {

  // Compute list of attribute values   
  newVals = new FastVector(att.numValues() - 1);
  for (int i = 0; i < att.numValues(); i++) {
View Full Code Here

    newAtts = new FastVector();
    for (int j = 0; j < getInputFormat().numAttributes(); j++) {
      Attribute att = getInputFormat().attribute(j);
      if (!att.isNominal() || (j == getInputFormat().classIndex()) ||
    !m_Columns.isInRange(j)) {
  newAtts.addElement(att.copy());
      } else {
  if ( (att.numValues() <= 2) && (!m_TransformAll) ) {
    if (m_Numeric) {
      newAtts.addElement(new Attribute(att.name()));
    } else {
View Full Code Here

      } else {
  if ( (att.numValues() <= 2) && (!m_TransformAll) ) {
    if (m_Numeric) {
      newAtts.addElement(new Attribute(att.name()));
    } else {
      newAtts.addElement(att.copy());
    }
  } else {

    if (newClassIndex >= 0 && j < getInputFormat().classIndex()) {
      newClassIndex += att.numValues() - 1;
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.