code: public double cwa() {
      double acc = 0;
      for (int recall = 1; recall <= numSamples(); recall++) {
        acc += logPrecision(recall) / (double) recall;
      }
      return acc / numSamples();
    }
docs: confidence weighted accuracy assuming the scores are probabilities and using .5 as treshold