Changeset 822 for trunk/test/roc_test.cc


Ignore:
Timestamp:
Mar 19, 2007, 12:44:09 AM (15 years ago)
Author:
Peter
Message:

redesigned tTest fixes #212 and #156

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/roc_test.cc

    r821 r822  
    2222*/
    2323
     24#include "yat/classifier/DataLookupWeighted1D.h"
    2425#include "yat/classifier/Target.h"
    2526#include "yat/statistics/ROC.h"
     27#include "yat/statistics/utility.h"
    2628#include "yat/utility/matrix.h"
    2729#include "yat/utility/vector.h"
     
    5557    value(i)=i;
    5658  statistics::ROC roc;
    57   for (size_t i=0; i<value.size(); ++i){
    58     roc.add(value(i), target.binary(i));
    59   }
     59  add(roc, value, target);
    6060  double area = roc.area();
    6161  if (area!=0.0){
     
    6767  target.set_binary(1,true);
    6868  roc.reset();
    69   for (size_t i=0; i<value.size(); ++i)
    70     roc.add(value(i), target.binary(i));
     69  add(roc, value, target);
    7170  area = roc.area();
    7271  if (area!=1.0){
     
    10099  }
    101100 
     101  classifier::DataLookupWeighted1D dlw(target.size(),1.3);
     102  add(roc, dlw, target);
     103
    102104  if (ok)
    103105    return 0;
Note: See TracChangeset for help on using the changeset viewer.