Examples of numAttributes()


Examples of org.integratedmodelling.riskwiz.learning.data.Instances.numAttributes()

        Instances dataSet = new Instances(relationName, atts,
                m_cumulativeInstances.size());

        for (int i = 0; i < m_cumulativeInstances.size(); i++) {
            current = ((FastVector) m_cumulativeInstances.elementAt(i));
            double[] vals = new double[dataSet.numAttributes()];

            for (int j = 0; j < current.size(); j++) {
                Object cval = current.elementAt(j);

                if (cval instanceof String) {
View Full Code Here

Examples of org.jboss.cache.DataNode.numAttributes()

         System.out.println(node);
         if (i % 2 == 0)
         {
            if (i < 6)
            {
               int numElements = node.numAttributes();
               assertEquals(i + 1, numElements);
            }
            else
            {
               assertNull(node);
View Full Code Here

Examples of org.jboss.cache.Node.numAttributes()

      assertEquals(EvictedEventNode.ADD_NODE_EVENT, event.getEvent());
      assertEquals(fqn, event.getFqn());
      assertEquals(100, event.getElementDifference());
      assertNull(regionManager.getRegion(fqn.toString()).takeLastEventNode());
      node = cache.get(fqn.toString());
      assertEquals(100, node.numAttributes());

      assertNotNull(node);

      for (int i = 0; i < 100; i++)
      {
View Full Code Here

Examples of org.thymeleaf.dom.NestableAttributeHolderNode.numAttributes()

                }
               
            }

            final String[] normalizedAttributeNames = nestableNode.unsafeGetAttributeNormalizedNames();
            final int normalizedAttributesLen = nestableNode.numAttributes();
            for (int i = 0; i < normalizedAttributesLen; i++) {
                final String normalizedAttributeName = normalizedAttributeNames[i];
                final Set<ProcessorAndContext> processorsForAttributeName =
                        this.mergedSpecificProcessorsByAttributeName.get(normalizedAttributeName);
                if (processorsForAttributeName != null) {
View Full Code Here

Examples of weka.core.Attribute.numAttributes()

      }
      outW = new PrintWriter(getWriter());
      // print data file
      for (int i = 0; i < instances.numInstances(); i++) {
  Instance temp = instances.instance(i);
        for(int j = 0; j < temp.numAttributes(); j++){
            if(j != instances.classIndex()){
                if (temp.isMissing(j)) {
          outW.write("?,");
        } else if (instances.attribute(j).isNominal() ||
             instances.attribute(j).isString()) {
View Full Code Here

Examples of weka.core.DenseInstance.numAttributes()

  double x = convertFromPanelX(mouseX);
  double y = convertFromPanelY(mouseY);
 
  //build the training instance
  Instance newInstance = new DenseInstance(m_trainingData.numAttributes());
  for (int i = 0; i < newInstance.numAttributes(); i++) {
    if (i == classAttIndex) {
      newInstance.setValue(i,classValue);
    }
    else if (i == m_xAttribute)
      newInstance.setValue(i,x);
View Full Code Here

Examples of weka.core.Instance.numAttributes()

    }
    else {
      outInst = inst;
    }
   
    for (i = 0; i < outInst.numAttributes(); i++) {
      if (i > 0)
  result.append(m_FieldSeparator);
     
      if (outInst.isMissing(i))
  field = m_MissingValue;
View Full Code Here

Examples of weka.core.Instance.numAttributes()

            remapped += (applyTrainingSkipAdjust) ? m_trainingRemapSkipAdjust
                : 0;
            remapped += localSkipAdjust;
          }

          result.setValue(result.numAttributes() - 1, remapped);
        } else {
          double remapped = origValue - m_dateTimeStampInitialVal;
          remapped /= deltaTime();// m_deltaTime;

          // it might (or might not) make sense to take the floor here. For
View Full Code Here

Examples of weka.core.Instance.numAttributes()

          if (m_skipList != null && m_skipList.size() > 0) {
            remapped += (applyTrainingSkipAdjust) ? m_trainingRemapSkipAdjust
                : 0;
            remapped += localSkipAdjust;
          }
          result.setValue(result.numAttributes() - 1, remapped);
        }
      }
      return result;
    }
  }
View Full Code Here

Examples of weka.core.Instances.numAttributes()

    if (m_removeFilter == null) {

      // establish attributes to remove from first batch

      Instances toFilter = getInputFormat();
      int[] attsToDelete = new int[toFilter.numAttributes()];
      int numToDelete = 0;
      for(int i = 0; i < toFilter.numAttributes(); i++) {
  if (i==toFilter.classIndex()) continue; // skip class
  AttributeStats stats = toFilter.attributeStats(i);
  if (stats.distinctCount < 2) {
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.