-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomparision_analysis.py
More file actions
30 lines (25 loc) · 902 Bytes
/
Copy pathcomparision_analysis.py
File metadata and controls
30 lines (25 loc) · 902 Bytes
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
import pandas as pd
import matplotlib.pyplot as plt
# Load results from CSV
df = pd.read_csv("comparison_results.csv")
# Plot Clustering Quality Metrics
plt.figure(figsize=(10, 6))
plt.plot(df["Method"], df["Accuracy"], label="Accuracy", marker="o")
plt.plot(df["Method"], df["NMI"], label="NMI", marker="s")
plt.plot(df["Method"], df["ARI"], label="ARI", marker="d")
plt.xlabel("Method")
plt.ylabel("Clustering Score")
plt.title("Comparison of AHCKA vs HNCut Clustering Quality")
plt.legend()
plt.grid(True)
plt.show()
# Plot Runtime and Memory Usage
plt.figure(figsize=(10, 6))
plt.bar(df["Method"], df["Runtime"], label="Runtime (s)", color="red")
plt.bar(df["Method"], df["Memory (MB)"], label="Memory Usage (MB)", color="purple")
plt.xlabel("Method")
plt.ylabel("Resource Consumption")
plt.title("Comparison of AHCKA vs HNCut Computational Efficiency")
plt.legend()
plt.grid(True)
plt.show()