Package weka.core.pmml

Examples of weka.core.pmml.VectorInstance.dotProduct()


     * @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


     */
    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

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.