Examples of numValues()


Examples of weka.core.Instance.numValues()

      }
     
      // Update weight vector to reflect change a1 and a2, if linear SVM
      if (m_KernelIsLinear) {
  Instance inst1 = m_data.instance(i1);
  for (int p1 = 0; p1 < inst1.numValues(); p1++) {
    if (inst1.index(p1) != m_data.classIndex()) {
      m_weights[inst1.index(p1)] +=
        y1 * (a1 - alph1) * inst1.valueSparse(p1);
    }
  }
View Full Code Here

Examples of weka.core.Instance.numValues()

      m_weights[inst1.index(p1)] +=
        y1 * (a1 - alph1) * inst1.valueSparse(p1);
    }
  }
  Instance inst2 = m_data.instance(i2);
  for (int p2 = 0; p2 < inst2.numValues(); p2++) {
    if (inst2.index(p2) != m_data.classIndex()) {
      m_weights[inst2.index(p2)] +=
        y2 * (a2 - alph2) * inst2.valueSparse(p2);
    }
  }
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.