private XYCurve computePrecisionResult(int size, SetDBIDs positiveids, DBIDs order) { if(order.size() != size) { throw new IllegalStateException("Iterable result doesn't match database size - incomplete ordering?"); } int lastk = Math.min(size, maxk); XYCurve curve = new PrecisionAtKCurve(lastk); int pos = 0; DBIDIter i = order.iter(); for(int k = 1; k <= lastk; k++, i.advance()) { if(positiveids.contains(i)) { pos++; } curve.addAndSimplify(k, pos / (double) k); } return curve; }
private XYCurve computePrecisionResult(int size, SetDBIDs positiveids, DBIDs order) { if(order.size() != size) { throw new IllegalStateException("Iterable result doesn't match database size - incomplete ordering?"); } int lastk = Math.min(size, maxk); XYCurve curve = new PrecisionAtKCurve("k", "Precision", lastk); int pos = 0; DBIDIter i = order.iter(); for(int k = 1; k <= lastk; k++, i.advance()) { if(positiveids.contains(i)) { pos++; } curve.addAndSimplify(k, pos / (double) k); } return curve; }
private XYCurve computePrecisionResult(int size, SetDBIDs positiveids, DBIDs order) { if(order.size() != size) { throw new IllegalStateException("Iterable result doesn't match database size - incomplete ordering?"); } int lastk = Math.min(size, maxk); XYCurve curve = new PrecisionAtKCurve("k", "Precision", lastk); int pos = 0; DBIDIter i = order.iter(); for(int k = 1; k <= lastk; k++, i.advance()) { if(positiveids.contains(i)) { pos++; } curve.addAndSimplify(k, pos / (double) k); } return curve; }
curve.addAndSimplify(curreca, curprec); curve.addAndSimplify(1.0, postot / total); return curve;
curve.addAndSimplify(negcnt, poscnt); curve.addAndSimplify(negcnt, poscnt); curve.rescale(1. / negcnt, 1. / poscnt); return curve;
curve.addAndSimplify(negcnt, poscnt); curve.addAndSimplify(negcnt, poscnt); curve.rescale(1. / negcnt, 1. / poscnt); return curve;
curve.addAndSimplify(negcnt, poscnt); curve.addAndSimplify(negcnt, poscnt); curve.rescale(1. / negcnt, 1. / poscnt); return curve;