def find_score_thresh_cutoff(testres):
    '\n        FIXME\n        DUPLICATE CODE\n        rectify with experiment_drawing\n        '
    import vtool as vt
    if ut.VERBOSE:
        logger.info('[dev] FIX DUPLICATE CODE find_thresh_cutoff')
    assert (len(testres.cfgx2_qreq_) == 1), 'can only specify one config here'
    cfgx = 0
    test_qaids = testres.get_test_qaids()
    gt_rawscore = testres.get_infoprop_mat('qx2_gt_raw_score', qaids=test_qaids).T[cfgx]
    gf_rawscore = testres.get_infoprop_mat('qx2_gf_raw_score', qaids=test_qaids).T[cfgx]
    tp_nscores = gt_rawscore
    tn_nscores = gf_rawscore
    tn_qaids = tp_qaids = test_qaids
    part_attrs = {1: {'qaid': tp_qaids}, 0: {'qaid': tn_qaids}}
    fpr = None
    tpr = 0.85
    encoder = vt.ScoreNormalizer(adjust=8, fpr=fpr, tpr=tpr, monotonize=True)
    (name_scores, labels, attrs) = encoder._to_xy(tp_nscores, tn_nscores, part_attrs)
    encoder.fit(name_scores, labels, attrs)
    score_thresh = encoder.learn_threshold2()
    return score_thresh
FIXME
DUPLICATE CODE
rectify with experiment_drawing
def find_score_thresh_cutoff(testres):
    '\n        FIXME\n        DUPLICATE CODE\n        rectify with experiment_drawing\n        '
    import vtool as vt
    if ut.VERBOSE:
        logger.info('[dev] FIX DUPLICATE CODE find_thresh_cutoff')
    assert (len(testres.cfgx2_qreq_) == 1), 'can only specify one config here'
    cfgx = 0
    test_qaids = testres.get_test_qaids()
    gt_rawscore = testres.get_infoprop_mat('qx2_gt_raw_score', qaids=test_qaids).T[cfgx]
    gf_rawscore = testres.get_infoprop_mat('qx2_gf_raw_score', qaids=test_qaids).T[cfgx]
    tp_nscores = gt_rawscore
    tn_nscores = gf_rawscore
    tn_qaids = tp_qaids = test_qaids
    part_attrs = {1: {'qaid': tp_qaids}, 0: {'qaid': tn_qaids}}
    fpr = None
    tpr = 0.85
    encoder = vt.ScoreNormalizer(adjust=8, fpr=fpr, tpr=tpr, monotonize=True)
    (name_scores, labels, attrs) = encoder._to_xy(tp_nscores, tn_nscores, part_attrs)
    encoder.fit(name_scores, labels, attrs)
    score_thresh = encoder.learn_threshold2()
    return score_thresh