1 #ifndef _theplu_yat_statistics_sam_score_ 2 #define _theplu_yat_statistics_sam_score_ 34 namespace classifier {
35 class DataLookWeighted1D;
37 namespace statistics {
58 SAMScore(
const double s0,
bool absolute=
true);
104 double score(
const T& positive,
const T& negative)
const 106 if(positive.n()+negative.n()<=2)
108 double diff = positive.mean() - negative.mean();
109 double s2 = ( (1.0/positive.n()+1.0/negative.n()) *
110 (positive.sum_xx_centered()+negative.sum_xx_centered()) /
111 (positive.n()+negative.n()-2) );
112 if (diff<0 && absolute_)
113 return -diff/(sqrt(s2)+s0_);
114 return diff/(sqrt(s2)+s0_);
Class for containing sample labels.
Definition: Target.h:47
The Department of Theoretical Physics namespace as we define it.
This is the yat interface to GSL vector.
Definition: VectorBase.h:55
Interface Class for score classes.
Definition: Score.h:42
Class for score used in Significance Analysis of Microarrays (SAM).
Definition: SAMScore.h:50
Class for general weighted vector view.
Definition: DataLookupWeighted1D.h:43