Spaces:
Sleeping
Sleeping
Update stats_data.py
Browse files- stats_data.py +31 -10
stats_data.py
CHANGED
|
@@ -14,21 +14,42 @@ SPEAKER_META = {
|
|
| 14 |
}
|
| 15 |
|
| 16 |
def get_indomain_breakdown():
|
|
|
|
| 17 |
data = {
|
| 18 |
"Speaker": ["M05", "F01", "M01", "M04", "M02", "M03", "F03", "F04"],
|
| 19 |
"Severity": ["Severe", "Severe", "Moderate", "Moderate", "Mild", "Mild", "Mild", "Mild"],
|
| 20 |
-
"Whisper Tiny": [
|
| 21 |
-
"
|
| 22 |
-
"10K Model (Ours)": ["25.4%", "24.1%", "44.1%", "41.2%", "79.1%", "77.5%", "79.0%", "78.2%"]
|
| 23 |
}
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
def get_experimental_summary():
|
|
|
|
| 27 |
data = {
|
| 28 |
-
"
|
| 29 |
-
"Whisper Tiny
|
| 30 |
-
"
|
| 31 |
-
"10K Triple-Mix Score": ["54.67%", "24.76%", "5.98%"],
|
| 32 |
-
"Relative Gain (Best vs Baseline)": ["+41.6%", "+100.0%", "+42.9%"]
|
| 33 |
}
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
}
|
| 15 |
|
| 16 |
def get_indomain_breakdown():
|
| 17 |
+
# Primary Data for Torgo In-Domain (5K Model is the Accuracy Champion)
|
| 18 |
data = {
|
| 19 |
"Speaker": ["M05", "F01", "M01", "M04", "M02", "M03", "F03", "F04"],
|
| 20 |
"Severity": ["Severe", "Severe", "Moderate", "Moderate", "Mild", "Mild", "Mild", "Mild"],
|
| 21 |
+
"Whisper Tiny": [12.1, 12.6, 32.7, 31.8, 62.1, 58.4, 61.2, 59.1],
|
| 22 |
+
"DSR Lab (5K)": [33.1, 34.2, 47.2, 45.6, 84.5, 81.8, 83.5, 82.8]
|
|
|
|
| 23 |
}
|
| 24 |
+
df = pd.DataFrame(data)
|
| 25 |
+
|
| 26 |
+
# Calculate Gains
|
| 27 |
+
df["Absolute Gain (%)"] = (df["DSR Lab (5K)"] - df["Whisper Tiny"]).round(2)
|
| 28 |
+
df["Relative Improvement (%)"] = (((df["DSR Lab (5K)"] - df["Whisper Tiny"]) / df["Whisper Tiny"]) * 100).round(1)
|
| 29 |
+
|
| 30 |
+
# Format for display
|
| 31 |
+
df["Whisper Tiny"] = df["Whisper Tiny"].astype(str) + "%"
|
| 32 |
+
df["DSR Lab (5K)"] = df["DSR Lab (5K)"].astype(str) + "%"
|
| 33 |
+
df["Absolute Gain (%)"] = "+" + df["Absolute Gain (%)"].astype(str) + "%"
|
| 34 |
+
df["Relative Improvement (%)"] = "+" + df["Relative Improvement (%)"].astype(str) + "%"
|
| 35 |
+
|
| 36 |
+
return df
|
| 37 |
|
| 38 |
def get_experimental_summary():
|
| 39 |
+
# Comparing conditions (In-Domain, LOSO, Zero-Shot)
|
| 40 |
data = {
|
| 41 |
+
"Condition": ["In-Domain (Seen Torgo)", "LOSO (Unseen Torgo F01)", "Zero-Shot (UA-Speech F02)"],
|
| 42 |
+
"Whisper Tiny": [41.50, 12.38, 4.33],
|
| 43 |
+
"Our Best Score": [58.77, 24.76, 6.19]
|
|
|
|
|
|
|
| 44 |
}
|
| 45 |
+
df = pd.DataFrame(data)
|
| 46 |
+
|
| 47 |
+
# Calculate Relative Gain
|
| 48 |
+
df["Relative Gain"] = (((df["Our Best Score"] - df["Whisper Tiny"]) / df["Whisper Tiny"]) * 100).round(1)
|
| 49 |
+
|
| 50 |
+
# Format for display
|
| 51 |
+
df["Whisper Tiny"] = df["Whisper Tiny"].astype(str) + "%"
|
| 52 |
+
df["Our Best Score"] = df["Our Best Score"].astype(str) + "%"
|
| 53 |
+
df["Relative Gain"] = "+" + df["Relative Gain"].astype(str) + "%"
|
| 54 |
+
|
| 55 |
+
return df
|