Examples of NaturalRanking


Examples of org.apache.commons.math3.stat.ranking.NaturalRanking

     *
     * @param dataMatrix matrix of data with columns representing
     * variables to correlate
     */
    public SpearmansCorrelation(final RealMatrix dataMatrix) {
        this(dataMatrix, new NaturalRanking());
    }
View Full Code Here

Examples of org.apache.commons.math3.stat.ranking.NaturalRanking

     * Create a test instance where NaN's are left in place and ties get
     * the average of applicable ranks. Use this unless you are very sure
     * of what you are doing.
     */
    public WilcoxonSignedRankTest() {
        naturalRanking = new NaturalRanking(NaNStrategy.FIXED,
                TiesStrategy.AVERAGE);
    }
View Full Code Here

Examples of org.apache.commons.math3.stat.ranking.NaturalRanking

     * @param tiesStrategy
     *            specifies the strategy that should be used for ties
     */
    public WilcoxonSignedRankTest(final NaNStrategy nanStrategy,
                                  final TiesStrategy tiesStrategy) {
        naturalRanking = new NaturalRanking(nanStrategy, tiesStrategy);
    }
View Full Code Here

Examples of org.apache.commons.math3.stat.ranking.NaturalRanking

     * Create a test instance using where NaN's are left in place and ties get
     * the average of applicable ranks. Use this unless you are very sure of
     * what you are doing.
     */
    public MannWhitneyUTest() {
        naturalRanking = new NaturalRanking(NaNStrategy.FIXED,
                TiesStrategy.AVERAGE);
    }
View Full Code Here

Examples of org.apache.commons.math3.stat.ranking.NaturalRanking

     * @param tiesStrategy
     *            specifies the strategy that should be used for ties
     */
    public MannWhitneyUTest(final NaNStrategy nanStrategy,
                            final TiesStrategy tiesStrategy) {
        naturalRanking = new NaturalRanking(nanStrategy, tiesStrategy);
    }
View Full Code Here

Examples of org.apache.commons.math3.stat.ranking.NaturalRanking

    @Test
    public void testMath891Array() {
        final double[] xArray = new double[] { Double.NaN, 1.9, 2, 100, 3 };
        final double[] yArray = new double[] { 10, 2, 10, Double.NaN, 4 };

        NaturalRanking ranking = new NaturalRanking(NaNStrategy.REMOVED);
        SpearmansCorrelation spearman = new SpearmansCorrelation(ranking);
       
        Assert.assertEquals(0.5, spearman.correlation(xArray, yArray), Double.MIN_VALUE);
    }
View Full Code Here

Examples of org.apache.commons.math3.stat.ranking.NaturalRanking

            matrix.addToEntry(i, 0, xArray[i]);
            matrix.addToEntry(i, 1, yArray[i]);
        }

        // compute correlation
        NaturalRanking ranking = new NaturalRanking(NaNStrategy.REMOVED);
        SpearmansCorrelation spearman = new SpearmansCorrelation(matrix, ranking);
       
        Assert.assertEquals(0.5, spearman.getCorrelationMatrix().getEntry(0, 1), Double.MIN_VALUE);
    }
View Full Code Here

Examples of org.apache.commons.math3.stat.ranking.NaturalRanking

     *
     * @param dataMatrix matrix of data with columns representing
     * variables to correlate
     */
    public SpearmansCorrelation(final RealMatrix dataMatrix) {
        this(dataMatrix, new NaturalRanking());
    }
View Full Code Here

Examples of org.apache.commons.math3.stat.ranking.NaturalRanking

    /**
     * Create a SpearmansCorrelation without data.
     */
    public SpearmansCorrelation() {
        data = null;
        this.rankingAlgorithm = new NaturalRanking();
        rankCorrelation = null;
    }
View Full Code Here

Examples of org.apache.commons.math3.stat.ranking.NaturalRanking

     * Create a test instance using where NaN's are left in place and ties get
     * the average of applicable ranks. Use this unless you are very sure of
     * what you are doing.
     */
    public MannWhitneyUTest() {
        naturalRanking = new NaturalRanking(NaNStrategy.FIXED,
                TiesStrategy.AVERAGE);
    }
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.