Package weka.core

Examples of weka.core.FastVector.elementAt()


    if (inPoly(tmp, x, y)) {
      rt = m_set1.calcClassType(i);
      return rt;
    }
  }
  else if (((Double)tmp.elementAt(0)).intValue() == POLYLINE) {
    if (inPolyline(tmp, x, y)) {
      rt = m_set1.calcClassType(i);
      return rt;
    }
  }
View Full Code Here


      FastVector tmp = (FastVector)m_ranges.elementAt(0);
     
      if (m_classObject != null && m_training.classAttribute().isNominal()) {
  s.append("Classified by " + m_classObject.getClass().getName());
      }
      else if (((Double)tmp.elementAt(0)).intValue() == LEAF) {
  if (m_training.classAttribute().isNominal()) {
    double high = -1000;
    int num = 0;
    double count = 0;
    for (int noa = 0; noa < m_training.classAttribute().numValues();
View Full Code Here

    double high = -1000;
    int num = 0;
    double count = 0;
    for (int noa = 0; noa < m_training.classAttribute().numValues();
         noa++) {
      if (((Double)tmp.elementAt(noa + 1)).doubleValue() > high) {
        high = ((Double)tmp.elementAt(noa + 1)).doubleValue();
        num  = noa + 1;
      }
      count += ((Double)tmp.elementAt(noa + 1)).doubleValue();
    }
View Full Code Here

    int num = 0;
    double count = 0;
    for (int noa = 0; noa < m_training.classAttribute().numValues();
         noa++) {
      if (((Double)tmp.elementAt(noa + 1)).doubleValue() > high) {
        high = ((Double)tmp.elementAt(noa + 1)).doubleValue();
        num  = noa + 1;
      }
      count += ((Double)tmp.elementAt(noa + 1)).doubleValue();
    }
    s.append(m_training.classAttribute().value(num-1) + "(" + count);
View Full Code Here

         noa++) {
      if (((Double)tmp.elementAt(noa + 1)).doubleValue() > high) {
        high = ((Double)tmp.elementAt(noa + 1)).doubleValue();
        num  = noa + 1;
      }
      count += ((Double)tmp.elementAt(noa + 1)).doubleValue();
    }
    s.append(m_training.classAttribute().value(num-1) + "(" + count);
    if (count > high) {
      s.append("/" + (count - high));
    }
View Full Code Here

    }
    s.append(")");
  }
  else {
    if (m_classObject == null
        && ((Double)tmp.elementAt(0)).intValue() == LEAF) {
      setLinear();
    }
    s.append("Standard Deviation = "
       + Utils.doubleToString(((Double)tmp.elementAt(1))
            .doubleValue(), 6));
View Full Code Here

    if (m_classObject == null
        && ((Double)tmp.elementAt(0)).intValue() == LEAF) {
      setLinear();
    }
    s.append("Standard Deviation = "
       + Utils.doubleToString(((Double)tmp.elementAt(1))
            .doubleValue(), 6));
   
  }
      }
      else {
View Full Code Here

     
     
      if (m_classObject != null && m_training.classAttribute().isNominal()) {
  s.append("Classified by\\n" + m_classObject.getClass().getName());
      }
      else if (((Double)tmp.elementAt(0)).intValue() == LEAF) {
 
  if (m_training.classAttribute().isNominal()) {
    boolean first = true;
    for (int noa = 0; noa < m_training.classAttribute().numValues();
         noa++) {
View Full Code Here

 
  if (m_training.classAttribute().isNominal()) {
    boolean first = true;
    for (int noa = 0; noa < m_training.classAttribute().numValues();
         noa++) {
      if (((Double)tmp.elementAt(noa + 1)).doubleValue() > 0) {
        if (first)
    {
      s.append("[" + m_training.classAttribute().value(noa));
      first = false;
    }
View Full Code Here

    }
        else
    {
      s.append("\\n[" + m_training.classAttribute().value(noa));
    }
        s.append(", " + ((Double)tmp.elementAt(noa + 1)).doubleValue()
           + "]");
      }     
    }
  }
  else {
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.