icb-stats API icb-stats-31 (20120309094430)

edu.cornell.med.icb.stat
Class ZScoreCalculator

java.lang.Object
  extended by edu.cornell.med.icb.stat.ZScoreCalculator

public class ZScoreCalculator
extends Object

A helper class to calculate zScores for observations. Call observe(x) for each value is needed, then call calculateStats(), then call zScore(x) again to read the zScore.

Author:
Fabien Campagne Date: Jun 22, 2007 Time: 5:25:57 PM

Constructor Summary
ZScoreCalculator()
           
 
Method Summary
 void calculateStats()
          Calculate mean and std deviation of scores.
 double count()
           
 double max()
           
 double mean()
           
 double min()
           
 void observe(double x)
           
 void reset()
          Reset the calculator to a state before any value have been observed.
 double stdDev()
           
 double sum()
           
 double zScore(double x)
           
 double zScore(double x, boolean useMinimumAsMean)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZScoreCalculator

public ZScoreCalculator()
Method Detail

observe

public void observe(double x)

calculateStats

public final void calculateStats()
Calculate mean and std deviation of scores.


zScore

public double zScore(double x)

zScore

public double zScore(double x,
                     boolean useMinimumAsMean)

stdDev

public double stdDev()

mean

public double mean()

sum

public double sum()

count

public double count()

min

public double min()

max

public double max()

reset

public void reset()
Reset the calculator to a state before any value have been observed.


icb-stats API icb-stats-31 (20120309094430)

Copyright © 2008-2012 Institute for Computational Biomedicine, All Rights Reserved.