Example usage for org.apache.commons.math3.stat.ranking NaNStrategy MINIMAL

List of usage examples for org.apache.commons.math3.stat.ranking NaNStrategy MINIMAL

Introduction

In this page you can find the example usage for org.apache.commons.math3.stat.ranking NaNStrategy MINIMAL.

Prototype

NaNStrategy MINIMAL

To view the source code for org.apache.commons.math3.stat.ranking NaNStrategy MINIMAL.

Click Source Link

Document

NaNs are considered minimal in the ordering

Usage

From source file:ch.unil.genescore.vegas.GeneDataFakePhenotype.java

private void addSignal(double[] fakePheno) {

    for (int i = 0; i < fakePheno.length; i++) {
        fakePheno[i] = fakePheno[i] + fakeSignal_[i];
    }//from   www .j av  a  2s. com
    NaturalRanking ranking = new NaturalRanking(NaNStrategy.MINIMAL, TiesStrategy.MAXIMUM);
    double[] ranks = ranking.rank(fakePheno);
    for (int i = 0; i < fakePheno.length; i++) {
        //fakePheno[i]=myNormal.inverseCumulativeProbability(ranks[i]/(ranks.length+1));         
        fakePheno[i] = DistributionMethods.normalInverseCumulativeProbability(ranks[i] / (ranks.length + 1));

    }
}