- Timestamp:
- Nov 15, 2008, 5:01:46 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/kolmogorov_smirnov_test.cc
r1618 r1626 42 42 test_one_sample(suite); 43 43 test_two_sample(suite); 44 //test_p_value(suite);44 test_p_value(suite); 45 45 test_reset(suite); 46 46 … … 116 116 ks.add(i+14.5, false); 117 117 } 118 suite.add(suite.equal(ks.score(), 0.15, 10)); 119 118 120 statistics::Averager a; 119 121 for (size_t n=0; n<100; ++n) { -
trunk/yat/statistics/KolmogorovSmirnov.cc
r1617 r1626 29 29 #include <deque> 30 30 #include <functional> 31 #include <limits> 31 32 32 33 namespace theplu { … … 84 85 targets.push_back(i->second); 85 86 87 double score_threshold = score()-10*std::numeric_limits<double>().epsilon(); 88 86 89 for (size_t i=0; i<perm; ++i){ 87 90 random::random_shuffle(targets.begin(), targets.end()); … … 92 95 ks.add(iter->first.first, *target_i, iter->first.second); 93 96 94 if (ks.score()>=score ())97 if (ks.score()>=score_threshold) 95 98 ++count; 96 99 }
Note: See TracChangeset
for help on using the changeset viewer.