Package org.apache.commons.math.stat.inference

Examples of org.apache.commons.math.stat.inference.ChiSquareTestImpl


            expected[i] = hashCount * 1.0 / bf.getSize();
        }

        double pValue = 0;
        double chiSq = 0;
        ChiSquareTestImpl cs = new ChiSquareTestImpl();
        try {
            pValue = cs.chiSquareTest(expected, observed);
            chiSq = cs.chiSquare(expected, observed);
        } catch (Exception e) {
            e.printStackTrace();
        }

        System.out.println("Hash Quality (Chi-Squared-Test): p-value = " + pValue + " , Chi-Squared-Statistic = "
View Full Code Here


                counts[i][1] = subnode.getRecalDatum().getNumObservations() + 2L;
                i++;
            }

            try {
                final double chi2PValue = new ChiSquareTestImpl().chiSquareTest(counts);
                final double penalty = -10.0 * Math.log10(Math.max(chi2PValue, SMALLEST_CHI2_PVALUE));

                // make sure things are reasonable and fail early if not
                if (Double.isInfinite(penalty) || Double.isNaN(penalty))
                    throw new ReviewedGATKException("chi2 value is " + chi2PValue + " at " + getRecalDatum());
View Full Code Here

TOP

Related Classes of org.apache.commons.math.stat.inference.ChiSquareTestImpl

Copyright © 2018 www.massapicom. 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.