Package de.jungblut.math

Examples of de.jungblut.math.DoubleVector.dot()


      final CostGradientTuple evaluateCost2 = f.evaluateCost(input);
      double f2 = evaluateCost2.getCost();
      DoubleVector df2 = evaluateCost2.getGradient();

      i = i + (length < 0 ? 1 : 0); // count epochs
      double d2 = df2.dot(s);
      // initialize point 3 equal to point 1
      double f3 = f1;
      double d3 = d1;
      double z3 = -z1;
      if (length > 0) {
View Full Code Here


          final CostGradientTuple evaluateCost3 = f.evaluateCost(input);
          f2 = evaluateCost3.getCost();
          df2 = evaluateCost3.getGradient();
          M = M - 1;
          i = i + (length < 0 ? 1 : 0); // count epochs
          d2 = df2.dot(s);
          // z3 is now relative to the location of z2
          z3 = z3 - z2;
        }
        if (f2 > f1 + z1 * RHO * d1 || d2 > -SIG * d1) {
          break; // this is a failure
View Full Code Here

        final CostGradientTuple evaluateCost3 = f.evaluateCost(input);
        f2 = evaluateCost3.getCost();
        df2 = evaluateCost3.getGradient();
        M = M - 1;
        i = i + (length < 0 ? 1 : 0); // count epochs?!
        d2 = df2.dot(s);
      }// end of line search

      DoubleVector tmp = null;

      if (success == 1) { // if line search succeeded
View Full Code Here

        alphas[i] = -sList.get(i).dot(dir) / roList.get(i);
        addMult(dir, yList.get(i), alphas[i]);
      }

      DoubleVector lastY = yList.get(count - 1);
      double yDotY = lastY.dot(lastY);
      double scalar = roList.get(count - 1) / yDotY;
      scale(dir, scalar);

      for (int i = 0; i < count; i++) {
        double beta = yList.get(i).dot(dir) / roList.get(i);
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.