Package CHEM :: Package Common :: Module StatsUtil :: Class StatsUtil
[hide private]
[frames] | no frames]

Class StatsUtil



Simple statistics utility. Given a set of numbers, calculate aggregate statistics like min, max, mean, standard deviation, etc.

Instance Methods [hide private]
 
__init__(self, dataSet, weights=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence...)
Initialization constructor
 
mean(self)
Return the mean / average of the data set, ignoring None values
 
stdDev(self)
Return the standard deviation of the data set, ignoring None values
 
meanW(self)
Return the weighted mean / average of the data set, ignoring None and zero-weighted values
 
stdDevW(self)
Return the weighted standard deviation of the data set, ignoring None and zero-weighted values.
 
rmsd(self, value)
Return the root-mean-square deviation for the data set with respect to a value.
 
rmsdW(self, value)
 
min(self)
Return the minimum value in the data set
 
max(self)
Return the maximum value in the data set
 
countNonNull(self)
Returns the number of values in the data set that are not None
 
countNonZeroWeight(self)
Returns the number of values in the data set that are both not None and whose respective weight value is greater than 0.
Class Variables [hide private]
  dataSet = <CHEM.DB.rdb.search.NameRxnPatternMatchingModel.Sear...
Set of weights to apply to each data point
  weights = <CHEM.DB.rdb.search.NameRxnPatternMatchingModel.Sear...
Calcuated aggregate values.
  mMean = <CHEM.DB.rdb.search.NameRxnPatternMatchingModel.Search...
  mStdDev = <CHEM.DB.rdb.search.NameRxnPatternMatchingModel.Sear...
  mMeanW = <CHEM.DB.rdb.search.NameRxnPatternMatchingModel.Searc...
  mStdDevW = <CHEM.DB.rdb.search.NameRxnPatternMatchingModel.Sea...
  mMin = <CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchS...
  mMax = <CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchS...
Method Details [hide private]

rmsd(self, value)

 
Return the root-mean-square deviation for the data set with respect to a value. Returns the equivalent of the standard deviation function, but using the value in place of the mean.

Class Variable Details [hide private]

dataSet

Set of weights to apply to each data point
Value:
None

weights

Calcuated aggregate values. Store after first calc.
Value:
None

mMean

Value:
None

mStdDev

Value:
None

mMeanW

Value:
None

mStdDevW

Value:
None

mMin

Value:
None

mMax

Value:
None