code: public double[/*actual*/][/*predicted*/] buildCM( int idx ) {
      //  \ predicted:  0   1
      //    actual  0: TN  FP
      //            1: FN  TP
      return new double[][]{{tn(idx),fp(idx)},{fn(idx),tp(idx)}};
    }
docs: Build a CM for a threshold index. - typed as doubles because of double observation weights