graphmaker
This commit is contained in:
@@ -2,9 +2,9 @@ import os
|
|||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
|
||||||
datasets = {
|
datasets = {
|
||||||
"cleaned": "games_march2025_cleaned",
|
#"cleaned": "games_march2025_cleaned",
|
||||||
"cleaned_2k": "games_march2025_cleaned_2k",
|
"cleaned_2k": "games_march2025_cleaned_2k_i3k",
|
||||||
"cleaned_10k": "games_march2025_cleaned_10k"
|
"cleaned_10k": "games_march2025_cleaned_10k_i3k"
|
||||||
}
|
}
|
||||||
# def results
|
# def results
|
||||||
results = {}
|
results = {}
|
||||||
@@ -28,14 +28,14 @@ x = range(len(models))
|
|||||||
|
|
||||||
plt.figure(figsize=(12,6))
|
plt.figure(figsize=(12,6))
|
||||||
#plt.bar([i - 0.25 for i in x], [results["cleaned"][m] for m in models], width=0.25, label="cleaned")
|
#plt.bar([i - 0.25 for i in x], [results["cleaned"][m] for m in models], width=0.25, label="cleaned")
|
||||||
plt.bar(x, [results["cleaned_2k"][m] for m in models], width=0.5)#, label="cleaned_2k")
|
plt.bar(x, [results["cleaned_2k"][m] for m in models], width=0.25, label="2k Dataset")
|
||||||
#plt.bar([i + 0.25 for i in x], [results["cleaned_10k"][m] for m in models], width=0.25, label="cleaned_10k")
|
plt.bar([i + 0.25 for i in x], [results["cleaned_10k"].get(m,0) for m in models], width=0.25, label="10k Dataset")
|
||||||
|
|
||||||
plt.xticks(x, models, rotation=90)
|
plt.xticks(x, models, rotation=90)
|
||||||
plt.ylim(0, 1) # min max
|
plt.ylim(0, 1) # min max
|
||||||
plt.ylabel("Weighted F1-Score")
|
plt.ylabel("Weighted F1-Score")
|
||||||
plt.title("Model Performance across Datasets")
|
plt.title("Model Performance across Datasets")
|
||||||
#plt.legend()
|
plt.legend()
|
||||||
plt.tight_layout()
|
plt.tight_layout()
|
||||||
plt.savefig('compare_graph_latest.png')
|
plt.savefig('compare_graph_latest.png')
|
||||||
plt.show()
|
plt.show()
|
||||||
|
|||||||
Reference in New Issue
Block a user