183 std::vector<double> pos, neg;
184 for(std::size_t i=0; i<prediction.size(); i++) {
187 pos.push_back(prediction.
element(i)(column));
189 neg.push_back(prediction.
element(i)(column));
192 pos.push_back(-prediction.
element(i)(column));
194 neg.push_back(-prediction.
element(i)(column));
197 std::size_t m = pos.size();
198 std::size_t n = neg.size();
200 std::sort (pos.begin(), pos.end());
201 std::sort (neg.begin(), neg.end());
204 for(std::size_t i = 0, j = 0; i != m; i++) {
206 for(std::size_t j = 0; j != n; j++) {
217 for(std::size_t i=0; i<m; i++) {
218 for(std::size_t j=0; j<n; j++) {
219 if(pos[i] > neg[j]) verifyA++;
223 throw(
shark::Exception(
"shark::WilcoxonMannWhitneyStatistic::eval: error in algorithm, efficient and naive implementation do no coincide", __FILE__, __LINE__ ) );