使用scikit-learn模拟机器学习正负样本不均衡时ROC曲线和PR曲线,可调整识别正确和错误的样本数量,概率使用随机值
#!/usr/bin/envpython3#-*-coding:UTF-8-*-#@Date:2023/10/1616:57#@Author:HELINfromsklearnimportmetricsfromsklearn.metricsimportroc_curve,auc,precision_recall_curve,average_precision_score,confusion_matr