Examples of normF()


Examples of Jama.Matrix.normF()

        } catch (java.lang.RuntimeException e) {
            errorCount = try_failure(errorCount, "normInf()...",
                    "incorrect norm calculation");
        }
        try {
            check(A.normF(), Math.sqrt(sumofsquares));
            try_success("normF...", "");
        } catch (java.lang.RuntimeException e) {
            errorCount = try_failure(errorCount, "normF()...",
                    "incorrect norm calculation");
        }
View Full Code Here

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

    Matrix common = X.transposeTimesTranspose(F).times(F);
    Matrix b = common.times(X).inverse().times(common.times(Y));
    // Estimate sigma_0 and sigma:
    // sigma_sum_square = sigma_0*sigma_0 + sigma*sigma
    Matrix sigmaMat = F.times(X.times(b).minus(F.times(Y)));
    final double sigma_sum_square = sigmaMat.normF() / (relationx.size() - 6 - 1);
    final double norm = 1 / Math.sqrt(sigma_sum_square);

    // calculate the absolute values of standard residuals
    Matrix E = F.times(Y.minus(X.times(b))).timesEquals(norm);

View Full Code Here

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

    Matrix common = X.transposeTimesTranspose(F).times(F);
    Matrix b = common.times(X).inverse().times(common.times(Y));
    // Estimate sigma_0 and sigma:
    // sigma_sum_square = sigma_0*sigma_0 + sigma*sigma
    Matrix sigmaMat = F.times(X.times(b).minus(F.times(Y)));
    final double sigma_sum_square = sigmaMat.normF() / (relationx.size() - 6 - 1);
    final double norm = 1 / Math.sqrt(sigma_sum_square);

    // calculate the absolute values of standard residuals
    Matrix E = F.times(Y.minus(X.times(b))).timesEquals(norm);

View Full Code Here

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

   * @param eigenPair the eigenpair to be normalized
   *
   */
  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 org.ejml.simple.SimpleMatrix.normF()

        SimpleMatrix _W = SimpleMatrix.wrap(W);
        SimpleMatrix _Vt = SimpleMatrix.wrap(Vt);

        SimpleMatrix foundA = _U.mult(_W).mult(_Vt);

        return SpecializedOps.diffNormF(orig,foundA.getMatrix())/foundA.normF();
    }

    /**
     * <p>
     * Computes a metric which measures the the quality of an eigen value decomposition.  If a
View Full Code Here

Examples of org.ejml.simple.SimpleMatrix.normF()

        SimpleMatrix L = A.mult(V);
        SimpleMatrix R = V.mult(D);

        SimpleMatrix diff = L.minus(R);

        double top = diff.normF();
        double bottom = L.normF();

        double error = top/bottom;

        return error;
View Full Code Here

Examples of org.ejml.simple.SimpleMatrix.normF()

            if( max > 0 && v.getNumElements() > 1 ) {
                // normalize to reduce overflow issues
                v = v.divide(max);

                // compute the magnitude of the vector
                double tau = v.normF();

                if( v.get(0) < 0 )
                    tau *= -1.0;

                double u_0 = v.get(0) + tau;
View Full Code Here

Examples of org.ejml.simple.SimpleMatrix.normF()

        SimpleMatrix A_found = U.mult(B).mult(Vt);
        SimpleMatrix A = SimpleMatrix.wrap(orig);

        double top = A_found.minus(A).normF();
        double bottom = A.normF();

        return top/bottom;
    }

    private static void runAlgorithms( DenseMatrix64F mat  )
View Full Code Here

Examples of org.ejml.simple.SimpleMatrix.normF()

        SimpleMatrix A_found = T.mult(T.transpose());
        SimpleMatrix A = SimpleMatrix.wrap(orig);

        double top = A_found.minus(A).normF();
        double bottom = A.normF();

        return top/bottom;
    }

    private static void runAlgorithms( DenseMatrix64F mat  )
View Full Code Here

Examples of org.ejml.simple.SimpleMatrix.normF()

        SimpleMatrix R = SimpleMatrix.wrap(alg.getR(null,true));

        SimpleMatrix A_found = Q.mult(R);
        SimpleMatrix A = SimpleMatrix.wrap(orig);

        return A.minus(A_found).normF()/A.normF();
    }

    public static double evaluate( QRPDecomposition<DenseMatrix64F> alg , DenseMatrix64F orig ) {

        double maxValue = CommonOps.elementMaxAbs(orig);
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.