Ignore:
Timestamp:
Mar 5, 2007, 7:58:30 PM (15 years ago)
Author:
Peter
Message:

Refs #101

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/score_test.cc

    r747 r779  
    2525#include "yat/statistics/FoldChange.h"
    2626#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"
    2929#include "yat/statistics/tScore.h"
    3030#include "yat/statistics/WilcoxonFoldChange.h"
     
    5252  bool ok = true;
    5353
    54   *error << "testing ROC" << std::endl;
     54  *error << "testing ROCscore" << std::endl;
    5555  utility::vector value(31);
    5656  std::vector<std::string> label(31,"negative");
     
    6060  for (size_t i=0; i<value.size(); i++)
    6161    value(i)=i;
    62   statistics::ROC roc;
     62  statistics::ROCscore roc;
    6363  double area = roc.score(target, value);
    6464  if (area!=1.0){
     
    7373    *error << "test_roc: area is " << area << " should be 1.0"
    7474           << 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: p-value 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: p-value not correct" << std::endl;
    8875    ok = false;
    8976  }
     
    141128  statistics::WilcoxonFoldChange wfc(true);
    142129
    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);
    145132
    146133
Note: See TracChangeset for help on using the changeset viewer.