code: public int[] cwaArray() {
      int[] arr = new int[numSamples()];
      for (int recall = 1; recall <= numSamples(); recall++) {
        arr[recall - 1] = logPrecision(recall);
      }
      return arr;
    }
docs: confidence weighted accuracy assuming the scores are probabilities and using .5 as treshold