Examples of numAttributes()


Examples of weka.core.Instances.numAttributes()

    outBuff.append("Relation:     " + trainHeader.relationName() + '\n');
    outBuff.append("Attributes:   " + trainHeader.numAttributes() + '\n');
    if (trainHeader.numAttributes() < 100) {
      boolean [] selectedAtts = new boolean [trainHeader.numAttributes()];
      for (int i = 0; i < trainHeader.numAttributes(); i++) {
        selectedAtts[i] = true;
      }
     
      if (ignoredAtts != null)
        for (int i=0; i<ignoredAtts.length; i++)
View Full Code Here

Examples of weka.core.Instances.numAttributes()

     
      if (ignoredAtts != null)
        for (int i=0; i<ignoredAtts.length; i++)
    selectedAtts[ignoredAtts[i]] = false;
    
      for (int i = 0; i < trainHeader.numAttributes(); i++) {
        if (selectedAtts[i]) {
    outBuff.append("              " + trainHeader.attribute(i).name()
             + '\n');
        }
      }
View Full Code Here

Examples of weka.core.Instances.numAttributes()

        m_createDate = m_createDate.toUpperCase();
      }
      m_tableName = m_tableName.replaceAll("[^\\w]","_");
      m_tableName = m_DataBaseConnection.maskKeyword(m_tableName);
      query.append(m_tableName);
      if(structure.numAttributes() == 0)
          throw new Exception("Instances have no attribute.");
      query.append(" ( ");
      if(m_id){
        if(m_DataBaseConnection.getUpperCase())
              m_idColumn = m_idColumn.toUpperCase();
View Full Code Here

Examples of weka.core.Instances.numAttributes()

        query.append(m_DataBaseConnection.maskKeyword(m_idColumn));
        query.append(" ");
        query.append(m_createInt);
        query.append(" PRIMARY KEY,");
      }
      for(int i = 0;i < structure.numAttributes(); i++){
          Attribute att = structure.attribute(i);
          String attName = att.name();
          attName = attName.replaceAll("[^\\w]","_");
          attName = m_DataBaseConnection.maskKeyword(attName);
          if(m_DataBaseConnection.getUpperCase())
View Full Code Here

Examples of weka.core.Instances.numAttributes()

              if(att.isNumeric())
                  query.append(" "+m_createDouble);
              else
                  query.append(" "+m_createText);
          }
          if(i != structure.numAttributes()-1)
              query.append(", ");
      }
      query.append(" )");
      //System.out.println(query.toString());
      m_DataBaseConnection.update(query.toString());
View Full Code Here

Examples of weka.core.Instances.numAttributes()

  }
   
  public static void main(String[] args) {
    try {
      Instances train = new Instances(new java.io.BufferedReader(new java.io.FileReader(args[0])));
      train.setClassIndex(train.numAttributes() - 1);
      weka.classifiers.evaluation.ThresholdCurve tc =
        new weka.classifiers.evaluation.ThresholdCurve();
      weka.classifiers.evaluation.EvaluationUtils eu =
        new weka.classifiers.evaluation.EvaluationUtils();
      //weka.classifiers.Classifier classifier = new weka.classifiers.functions.Logistic();
View Full Code Here

Examples of weka.core.Instances.numAttributes()

      if(writeMode == STRUCTURE_READY){
          setWriteMode(WRITE);
          //write header
          if(retrieveFile() == null || outW == null){
              // print out attribute names as first row
              for (int i = 0; i < structure.numAttributes(); i++) {
                System.out.print(structure.attribute(i).name());
                if (i < structure.numAttributes()-1) {
                    System.out.print(m_FieldSeparator);
                } else {
                    System.out.println();
View Full Code Here

Examples of weka.core.Instances.numAttributes()

          //write header
          if(retrieveFile() == null || outW == null){
              // print out attribute names as first row
              for (int i = 0; i < structure.numAttributes(); i++) {
                System.out.print(structure.attribute(i).name());
                if (i < structure.numAttributes()-1) {
                    System.out.print(m_FieldSeparator);
                } else {
                    System.out.println();
                }
              }
View Full Code Here

Examples of weka.core.Instances.numAttributes()

                    System.out.println();
                }
              }
          }
          else{
              for (int i = 0; i < structure.numAttributes(); i++) {
                outW.print(structure.attribute(i).name());
                if (i < structure.numAttributes()-1) {
                    outW.print(m_FieldSeparator);
                } else {
                    outW.println();
View Full Code Here

Examples of weka.core.Instances.numAttributes()

              }
          }
          else{
              for (int i = 0; i < structure.numAttributes(); i++) {
                outW.print(structure.attribute(i).name());
                if (i < structure.numAttributes()-1) {
                    outW.print(m_FieldSeparator);
                } else {
                    outW.println();
                }
              }
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.