Changeset 4103


Ignore:
Timestamp:
Sep 22, 2021, 10:25:08 AM (2 years ago)
Author:
Peter
Message:

closes #710

Location:
branches/0.19-stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/0.19-stable/test/Makefile.am

    r4100 r4103  
    142142
    143143# tests not passing through yet
    144 XFAIL_TESTS = test/kendall.test
     144XFAIL_TESTS =
    145145
    146146DISTRIBUTED_TESTS = \
  • branches/0.19-stable/test/kendall.cc

    r4100 r4103  
    171171  double p = kendall.p_value();
    172172  suite.out() << "p: " << p << "\n";
    173   if (p > 0.0001) {
    174     suite.err() << "error: too large p\n";
    175     suite.add(false);
    176   }
    177   if (p < 0.00001) {
    178     suite.err() << "error: too small p\n";
     173  if (p < 0.00001 || p > 0.0001) {
     174    suite.err() << "error: p not within [0.00001, 0.0001]\n";
    179175    suite.add(false);
    180176  }
  • branches/0.19-stable/yat/statistics/Kendall.cc

    r4089 r4103  
    4141#include <vector>
    4242
    43 
    44 #include <iostream> // debug
    4543namespace theplu {
    4644namespace yat {
     
    264262                   x_ties_);
    265263
     264    std::vector<double> vec(utility::pair_second_iterator(data.begin()),
     265                            utility::pair_second_iterator(data.end()));
     266    std::sort(vec.begin(), vec.end());
     267    calculate_ties(vec.begin(), vec.end(), y_ties_);
     268
    266269    /*
    267270                y1 < y2  y2 == y2  y2 > y2
     
    390393      v2 = sum t(t-1)(t-2) \sum u(u-1)(u-2) / (9n(n-1)(n-2))
    391394
    392       where t is number of equal values in group i and similarly u for
     395      where t is number of equal x values in group i and similarly u for
    393396      y.
    394397    */
Note: See TracChangeset for help on using the changeset viewer.