-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdraw.py
46 lines (40 loc) · 2.95 KB
/
draw.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import matplotlib.pyplot as plt
# DPIN
dpin_train_auc = [0.619642,0.677690,0.695845,0.706502,0.714265,0.720299,0.725110,0.728868,0.731877,0.734447,0.736773,0.738983,0.741073,0.743270,0.745838,0.749093,0.753468,0.758775,0.764418,0.769942]
dpin_train_pauc = [0.594025,0.662094,0.682075,0.693500,0.701816,0.708264,0.713368,0.717296,0.720440,0.723143,0.725616,0.727977,0.730258,0.732654,0.735475,0.739094,0.743985,0.749997,0.756297,0.762397]
dpin_train_loss = [0.2781496,0.27353084,0.27259213,0.2720058,0.2713421,0.27072558,0.26938844,0.26886362,0.2681798,0.26728863,0.26674402,0.2660343,0.2664581,0.26580113,0.26483583,0.26395977,0.26218155,0.2599912,0.25827345,0.255616]
dpin_test_auc = [0.662502,0.682085,0.684977,0.684908,0.684490,0.683848,0.683007,0.682635,0.682522,0.682916,0.683339,0.683739,0.684810,0.685569,0.685945,0.686248,0.685351,0.683827,0.681573,0.680048]
dpin_test_pauc = [0.642310,0.664699,0.667764,0.667743,0.667337,0.666609,0.665770,0.665446,0.665281,0.665951,0.666536,0.667032,0.668175,0.669080,0.669673,0.670179,0.669219,0.668006,0.665668,0.664391]
# DIN
din_train_auc = [0.518980,0.541195,0.553209,0.561868,0.568564,0.574089,0.578805,0.582915,0.586624,0.590003,0.593189,0.596188,0.599071,0.601840,0.604456,0.606884,0.609046,0.610970,0.612709,0.614305]
din_train_pauc = [0.571440,0.605077,0.617820,0.625136,0.629550,0.632647,0.635147,0.636624,0.637855,0.638619,0.638990,0.639055,0.638781,0.638224,0.637392,0.636297,0.634882,0.633271,0.631374,0.629183]
din_train_loss = [0.35476544,0.35444382,0.35412458,0.35380697,0.3534914,0.35317883,0.3528704,0.35256702,0.35226923,0.35197693,0.3516897,0.35140628,0.35112447,0.35084116,0.3505512,0.35024682,0.34991607,0.34954038,0.34909016,0.34851834]
din_test_auc = [0.599883,0.617768,0.623860,0.628405,0.630682,0.633462,0.633893,0.635436,0.636214,0.636337,0.636562,0.636723,0.636572,0.636146,0.635460,0.634666,0.633524,0.632418,0.631036,0.629552]
din_test_pauc = [0.590861,0.608771,0.614497,0.619200,0.621361,0.624108,0.624569,0.626069,0.626961,0.627020,0.627330,0.627555,0.627434,0.627078,0.626470,0.625847,0.624754,0.623780,0.622565,0.621280]
plt.figure(figsize=(10,5))
plt.subplot(121)
plt.plot(dpin_train_auc, color='b', label='dpin train')
plt.plot(dpin_test_auc, color='b', label='dpin test', linestyle='--')
plt.plot(din_train_auc, color='g', label='din train')
plt.plot(din_test_auc, color='g', label='din test', linestyle='--')
plt.title('AUC')
plt.xlabel('epoch')
plt.ylabel('auc')
plt.legend()
plt.subplot(122)
plt.plot(dpin_train_pauc, color='b', label='dpin train')
plt.plot(dpin_test_pauc, color='b', label='dpin test', linestyle='--')
plt.plot(din_train_pauc, color='g', label='din train')
plt.plot(din_test_pauc, color='g', label='din test', linestyle='--')
plt.title('PAUC')
plt.xlabel('epoch')
plt.ylabel('pauc')
plt.legend()
# plt.subplot(212)
# plt.plot(dpin_train_loss, label='dpin train')
# plt.plot(din_train_loss, label='din train', linestyle='--')
# plt.title('Loss')
# plt.xlabel('epoch')
# plt.ylabel('loss')
# plt.legend()
plt.show()