コード例 #1
0
#plt.show()
#
xgb.plot_importance(clf)
plt.savefig(utils.IO.plotFolder + outTag + "importance2.eps")
#plt.show()

fpr_dipho_2ndtest_2, tpr_dipho_2ndtest_2 = plotting.plot_roc_curve_multiclass_singleBkg(
    X_total_test,
    y_total_test,
    clf,
    -1,
    1,
    outTag + "test_xgbr_diphotons",
    weights=w_total_test)
plotting.print_roc_report(fpr_dipho_2ndtest_2,
                          tpr_dipho_2ndtest_2,
                          outString=outTag + "test_xgbr_diphotons")
plt.savefig(utils.IO.plotFolder + outTag + "test_xgbr_diphotons.eps")
#plt.show()
fpr_gJets_2ndtest_2, tpr_gJets_2ndtest_2 = plotting.plot_roc_curve_multiclass_singleBkg(
    X_total_test,
    y_total_test,
    clf,
    -2,
    1,
    outTag + "test_xgbr_gJets",
    weights=w_total_test)
plotting.print_roc_report(fpr_gJets_2ndtest_2,
                          tpr_gJets_2ndtest_2,
                          outString=outTag + "test_xgbr_gJets")
plt.savefig(utils.IO.plotFolder + outTag + "test_xgbr_gJets.eps")
コード例 #2
0
xgb.plot_importance(clf)
plt.savefig(str(folder) + '/' + outTag + "_importance2.pdf")
plt.clf()
#plt.show()

fpr_dipho_2ndtest_2, tpr_dipho_2ndtest_2 = plotting.plot_roc_curve_multiclass_singleBkg(
    X_total_test,
    y_total_test,
    clf,
    -1,
    1,
    outTag + "_test_xgbr_diphotons",
    weights=w_total_test)
plotting.print_roc_report(fpr_dipho_2ndtest_2,
                          tpr_dipho_2ndtest_2,
                          outString=str(sig) + "_" + outTag + "_" + str(year) +
                          "_test_xgbr_diphotons")
plt.savefig(str(folder) + '/' + outTag + "_test_xgbr_diphotons.pdf")
plt.clf()
#plt.show()
fpr_gJets_2ndtest_2, tpr_gJets_2ndtest_2 = plotting.plot_roc_curve_multiclass_singleBkg(
    X_total_test,
    y_total_test,
    clf,
    -2,
    1,
    outTag + "_test_xgbr_gJets",
    weights=w_total_test)
plotting.print_roc_report(fpr_gJets_2ndtest_2,
                          tpr_gJets_2ndtest_2,
                          outString=str(sig) + "_" + outTag + "_" + str(year) +