Examples of numAttributes()


Examples of weka.core.Instances.numAttributes()

    outBuff.append(" " + Utils.joinOptions(o));
  }
  outBuff.append("\n");
  if (trainHeader != null) {
    outBuff.append("Relation:     " + trainHeader.relationName() + '\n');
    outBuff.append("Attributes:   " + trainHeader.numAttributes() + '\n');
    if (trainHeader.numAttributes() < 100) {
      for (int i = 0; i < trainHeader.numAttributes(); i++) {
        outBuff.append("              " + trainHeader.attribute(i).name()
           + '\n');
      }
View Full Code Here

Examples of weka.core.Instances.numAttributes()

  }
  outBuff.append("\n");
  if (trainHeader != null) {
    outBuff.append("Relation:     " + trainHeader.relationName() + '\n');
    outBuff.append("Attributes:   " + trainHeader.numAttributes() + '\n');
    if (trainHeader.numAttributes() < 100) {
      for (int i = 0; i < trainHeader.numAttributes(); i++) {
        outBuff.append("              " + trainHeader.attribute(i).name()
           + '\n');
      }
    } else {
View Full Code Here

Examples of weka.core.Instances.numAttributes()

  outBuff.append("\n");
  if (trainHeader != null) {
    outBuff.append("Relation:     " + trainHeader.relationName() + '\n');
    outBuff.append("Attributes:   " + trainHeader.numAttributes() + '\n');
    if (trainHeader.numAttributes() < 100) {
      for (int i = 0; i < trainHeader.numAttributes(); i++) {
        outBuff.append("              " + trainHeader.attribute(i).name()
           + '\n');
      }
    } else {
      outBuff.append("              [list of attributes omitted]\n");
View Full Code Here

Examples of weka.core.Instances.numAttributes()

                throw new Exception("No user test set has been specified");
              }
              if (trainHeader != null) {
                boolean compatibilityProblem = false;
                if (trainHeader.classIndex() >
                    userTestStructure.numAttributes()-1) {
                  compatibilityProblem = true;
                  //throw new Exception("Train and test set are not compatible");
                }
                userTestStructure.setClassIndex(trainHeader.classIndex());
                if (!trainHeader.equalHeaders(userTestStructure)) {
View Full Code Here

Examples of weka.core.Instances.numAttributes()

              atts,
              m_cumulativeInstances.size());

    for (int i = 0; i < m_cumulativeInstances.size(); i++) {
      current = m_cumulativeInstances.get(i);
      double [] vals = new double[dataSet.numAttributes()];
      for (int j = 0; j < current.size(); j++) {
  Object cval = current.get(j);
  if (cval instanceof String) {
    if (((String)cval).compareTo(m_MissingValue) == 0) {
      vals[j] = Utils.missingValue();
View Full Code Here

Examples of weka.core.Instances.numAttributes()

    }
    Instances perspectiveInstances =
      new Instances("Perspectives", atts, 1);

    boolean[] selectedPerspectives =
      new boolean[perspectiveInstances.numAttributes()];
    for (String selected : VISIBLE_PERSPECTIVES) {
      String pName = PLUGIN_PERSPECTIVES.get(selected);
     
      // check here - just in case the user has uninstalled/deleted a plugin
      // perspective since the last time that the user-selected visible perspectives
View Full Code Here

Examples of weka.core.Instances.numAttributes()

    }
    Instances perspectiveInstances =
      new Instances("Perspectives", atts, 1);

    boolean[] selectedPerspectives =
      new boolean[perspectiveInstances.numAttributes()];
    for (String selected : VISIBLE_PERSPECTIVES) {
      String pName = m_pluginPerspectiveLookup.get(selected);
     
      // check here - just in case the user has uninstalled/deleted a plugin
      // perspective since the last time that the user-selected visible perspectives
View Full Code Here

Examples of weka.core.Instances.numAttributes()

      m_dateDerivedPeriodicSelector.clearTableModel();
      Instances insts = createDateDerivedPeriodicList();
      m_dateDerivedPeriodicSelector.setInstances(insts);
      m_dateDerivedPeriodicsHeader = insts;
     
      boolean[] selected = new boolean[insts.numAttributes()];
      for (int i = 0; i < insts.numAttributes(); i++) {
        if (i < NUM_PREDEFINED_PERIODICS) {
          switch (i) {
            case 0:
              if (predefined.contains("AM")) {
View Full Code Here

Examples of weka.core.Instances.numAttributes()

      Instances insts = createDateDerivedPeriodicList();
      m_dateDerivedPeriodicSelector.setInstances(insts);
      m_dateDerivedPeriodicsHeader = insts;
     
      boolean[] selected = new boolean[insts.numAttributes()];
      for (int i = 0; i < insts.numAttributes(); i++) {
        if (i < NUM_PREDEFINED_PERIODICS) {
          switch (i) {
            case 0:
              if (predefined.contains("AM")) {
                selected[i] = true;
View Full Code Here

Examples of weka.core.Instances.numAttributes()

                int[] selected = m_dateDerivedPeriodicSelector.getSelectedAttributes();
                Instances insts = createDateDerivedPeriodicList();
                m_dateDerivedPeriodicSelector.setInstances(insts);
                m_dateDerivedPeriodicsHeader = insts;
               
                boolean[] newSelected = new boolean[insts.numAttributes()];
                for (int i = 0; i < selected.length; i++) {
                  newSelected[selected[i]] = true;
                }
                try {
                  m_dateDerivedPeriodicSelector.setSelectedAttributes(newSelected);
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.