Changeset 779 for trunk/test/score_test.cc
 Timestamp:
 Mar 5, 2007, 7:58:30 PM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/score_test.cc
r747 r779 25 25 #include "yat/statistics/FoldChange.h" 26 26 #include "yat/statistics/Pearson.h" 27 #include "yat/statistics/ROC .h"28 #include "yat/statistics/SAM .h"27 #include "yat/statistics/ROCscore.h" 28 #include "yat/statistics/SAMScore.h" 29 29 #include "yat/statistics/tScore.h" 30 30 #include "yat/statistics/WilcoxonFoldChange.h" … … 52 52 bool ok = true; 53 53 54 *error << "testing ROC " << std::endl;54 *error << "testing ROCscore" << std::endl; 55 55 utility::vector value(31); 56 56 std::vector<std::string> label(31,"negative"); … … 60 60 for (size_t i=0; i<value.size(); i++) 61 61 value(i)=i; 62 statistics::ROC roc;62 statistics::ROCscore roc; 63 63 double area = roc.score(target, value); 64 64 if (area!=1.0){ … … 73 73 *error << "test_roc: area is " << area << " should be 1.0" 74 74 << std::endl; 75 ok = false;76 }77 78 double p = roc.p_value();79 double p_matlab = 0.00000115;80 if (p/p_matlab > 1.01  p/p_matlab < 0.99){81 *error << "get_p_approx: pvalue not correct" << std::endl;82 ok = false;83 }84 roc.minimum_size() = 20;85 p = roc.p_value();86 if (p > pow(10, 8.0)  p < pow(10, 9.0)){87 *error << "get_p_exact: pvalue not correct" << std::endl;88 75 ok = false; 89 76 } … … 141 128 statistics::WilcoxonFoldChange wfc(true); 142 129 143 *error << "testing SAM " << std::endl;144 statistics::SAM sam(1.0,true);130 *error << "testing SAMScore" << std::endl; 131 statistics::SAMScore sam(1.0,true); 145 132 146 133
Note: See TracChangeset
for help on using the changeset viewer.