Examples of timesEquals()


Examples of cc.mallet.types.LogNumber.timesEquals()

          }
         
          // update the dynamic programming table
          if (dotCache[ip][prev][curr] != null) {
            temp.set(xi[curr],true);
            temp.timesEquals(dotCache[ip][prev][curr]);
            node.alpha[curr].plusEquals(temp);
          }
          if (gamma == Transducer.IMPOSSIBLE_WEIGHT) {
            node.alpha[curr] = new LogNumber(Transducer.IMPOSSIBLE_WEIGHT,true);
          } else {
View Full Code Here

Examples of cc.mallet.types.LogNumber.timesEquals()

          }
          if (gamma == Transducer.IMPOSSIBLE_WEIGHT) {
            node.alpha[curr] = new LogNumber(Transducer.IMPOSSIBLE_WEIGHT,true);
          } else {
            temp.set(xi[curr] - gamma,true);
            temp.timesEquals(nuAlpha);
            node.alpha[curr].plusEquals(temp);
          }
          assert (!Double.isNaN(node.alpha[curr].logVal)) : "xi: " + xi[curr] + ", gamma: "
              + gamma + ", constraint feature: " + dotCache[ip][prev][curr]
              + ", nuApha: " + nuAlpha + " dot: " + dot;
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.math.linearalgebra.Matrix.timesEquals()

      // normalize v
      Matrix v_i = vector.copy();
      Matrix sum = new Matrix(dim, 1);
      for(int k = 0; k < corrDim; k++) {
        Matrix v_k = v.getColumn(k);
        sum.plusEquals(v_k.timesEquals(v_i.scalarProduct(0, v_k, 0)));
      }
      v_i.minusEquals(sum);
      v_i.timesEquals(1.0 / Math.sqrt(v_i.scalarProduct(0, v_i, 0)));
      v.setColumn(corrDim, v_i);
    }
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.math.linearalgebra.Vector.timesEquals()

   *
   */
  private void normalizeEigenPair(final EigenPair eigenPair) {
    final Vector eigenvector = eigenPair.getEigenvector();
    final double scaling = 1.0 / Math.sqrt(eigenPair.getEigenvalue()) * eigenvector.normF();
    eigenvector.timesEquals(scaling);
  }
}
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.math.linearalgebra.Vector.timesEquals()

  public Matrix dataProjections(V p) {
    Vector centered = p.getColumnVector().minus(centroid);
    Matrix sum = new Matrix(p.getDimensionality(), strongEigenvectors.getColumnDimensionality());
    for(int i = 0; i < strongEigenvectors.getColumnDimensionality(); i++) {
      Vector v_i = strongEigenvectors.getCol(i);
      v_i.timesEquals(centered.transposeTimes(v_i));
      sum.setCol(i, v_i);
    }
    return sum;
  }
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.math.linearalgebra.Vector.timesEquals()

   *
   */
  private void normalizeEigenPair(final EigenPair eigenPair) {
    final Vector eigenvector = eigenPair.getEigenvector();
    final double scaling = 1.0 / Math.sqrt(eigenPair.getEigenvalue()) * eigenvector.euclideanLength();
    eigenvector.timesEquals(scaling);
  }
}
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.math.linearalgebra.Vector.timesEquals()

          mean.plusEquals(database.get(clusterIter.next()).getColumnVector());
        }
      }
      if(list.size() > 0) {
        assert mean != null;
        mean.timesEquals(1.0 / list.size());
      }
      else {
        mean = means.get(i);
      }
      newMeans.add(mean);
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.math.linearalgebra.Vector.timesEquals()

      return; // Keep old mean
    }
    Vector delta = vec.getColumnVector();
    // Compute difference from mean
    delta.minusEquals(mean);
    delta.timesEquals(op / newsize);
    mean.plusEquals(delta);
  }

  /**
   * Perform a MacQueen style iteration.
View Full Code Here

Examples of weka.core.matrix.DoubleVector.timesEquals()

    DoubleVector d =
    Maths.dnormLog( x, mixingDistribution.getPointValues(), 1 );
   
    d.minusEquals( d.max() );
    d = d.map("java.lang.Math", "exp");
    d.timesEquals( mixingDistribution.getFunctionValues() );
    return mixingDistribution.getPointValues().innerProduct( d ) / d.sum();
  }

  /**
   * Returns the empirical Bayes estimate of a vector.
View Full Code Here

Examples of weka.core.matrix.DoubleVector.timesEquals()

    DoubleVector d = Maths.dnormLog( x, points, 1 );
    d.minusEquals( d.max() );

    d = (DoubleVector) d.map("java.lang.Math", "exp");
    d.timesEquals( values )

    return ((DoubleVector) points.times(2*x).minusEquals(x*x))
    .innerProduct( d ) / d.sum();
  }
   
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.