Package org.apache.mahout.math

Examples of org.apache.mahout.math.Matrix.viewColumn()


    Matrix u = generateDenseOrthonormalRandom(m, svCnt, rnd);

    // apply singular values
    Matrix mx = m > n ? v : u;
    for (int i = 0; i < svCnt; i++) {
      mx.assignColumn(i, mx.viewColumn(i).times(svalues.getQuick(i)));
    }

    SequenceFile.Writer w =
      SequenceFile.createWriter(dfs,
                                dfs.getConf(),
View Full Code Here


    endTime(TimingSection.TRIDIAG_DECOMP);
    startTime(TimingSection.FINAL_EIGEN_CREATE);
    for (int row = 0; row < i; row++) {
      Vector realEigen = null;

      Vector ejCol = eigenVects.viewColumn(row);
      int size = Math.min(ejCol.size(), state.getBasisSize());
      for (int j = 0; j < size; j++) {
        double d = ejCol.get(j);
        Vector rowJ = state.getBasisVector(j);
        if (realEigen == null) {
View Full Code Here

                    @Override
                    public double apply(double arg1) {
                        return rand.nextDouble() < 0.2 ? 1 : 0;
                    }
                });
        recipes.viewColumn(9).assign(1);

        Vector actualWeights = new DenseVector(new double[]{
                1, 0.25, -0.25, 0, 0,
                0, 0, 0, 0, -1});
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.