numba 编译优化 from numba import jit @jit def eval_mcc(y_true, y_prob, threshold=False): idx = np.argsort(y_prob) nump = np.sum(y_true) numn = idx.size - nump tp, tn, fp, fn = nump, 0.0, numn, 0.0 best_mcc, best_proba, prev_proba = 0.0, -1, -1 for proba,…