Package weka.core.pmml

Examples of weka.core.pmml.VectorInstance


     * @return the result of the kernel evaluation
     * @throws Exception if something goes wrong
     */
    public double evaluate(VectorInstance x, VectorInstance y)
    throws Exception {
      VectorInstance diff = x.subtract(y);
      double result = -m_gamma * diff.dotProduct(diff);

      return Math.exp(result);   
    }
View Full Code Here


     * @return the result of the kernel evaluation
     * @throws Exception if something goes wrong
     */
    public double evaluate(VectorInstance x, double[] y)
      throws Exception {
      VectorInstance diff = x.subtract(y);
//      System.err.println("diff: " + diff.getValues());
      double result = -m_gamma * diff.dotProduct(diff);
//      System.err.println("Result: " + result);
      return Math.exp(result);
    }
View Full Code Here

          NodeList allTheVectorsL =
            vectors.getElementsByTagName("SupportVector");
          for (int i = 0; i < allTheVectorsL.getLength(); i++) {
            Node vec = allTheVectorsL.item(i);
            String vecId = ((Element)vec).getAttribute("vectorId");
            VectorInstance suppV = dictionary.getVector(vecId);
            if (suppV == null) {
              throw new Exception("[SupportVectorMachine] : can't find " +
                  "vector with ID: " + vecId + " in the " +
              "vector dictionary!");
            }
View Full Code Here

TOP

Related Classes of weka.core.pmml.VectorInstance

Copyright © 2018 www.massapicom. 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.