Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ from sklearn.metrics import f1_score
|
|
15 |
import seaborn as sns
|
16 |
|
17 |
#################### BEAM PREDICTION #########################}
|
18 |
-
def beam_prediction_task(data_percentage, task_complexity, theme):
|
19 |
# Folder naming convention based on input_type, data_percentage, and task_complexity
|
20 |
raw_folder = f"images/raw_{data_percentage/100:.1f}_{task_complexity}"
|
21 |
embeddings_folder = f"images/embedding_{data_percentage/100:.1f}_{task_complexity}"
|
@@ -67,7 +67,7 @@ def compute_f1_score(cm):
|
|
67 |
f1 = np.nan_to_num(f1) # Replace NaN with 0
|
68 |
return np.mean(f1) # Return the mean F1-score across all classes
|
69 |
|
70 |
-
def plot_confusion_matrix_beamPred(cm, classes, title, save_path, theme='
|
71 |
# Compute the average F1-score
|
72 |
avg_f1 = compute_f1_score(cm)
|
73 |
|
|
|
15 |
import seaborn as sns
|
16 |
|
17 |
#################### BEAM PREDICTION #########################}
|
18 |
+
def beam_prediction_task(data_percentage, task_complexity, theme='Dark'):
|
19 |
# Folder naming convention based on input_type, data_percentage, and task_complexity
|
20 |
raw_folder = f"images/raw_{data_percentage/100:.1f}_{task_complexity}"
|
21 |
embeddings_folder = f"images/embedding_{data_percentage/100:.1f}_{task_complexity}"
|
|
|
67 |
f1 = np.nan_to_num(f1) # Replace NaN with 0
|
68 |
return np.mean(f1) # Return the mean F1-score across all classes
|
69 |
|
70 |
+
def plot_confusion_matrix_beamPred(cm, classes, title, save_path, theme='Dark'):
|
71 |
# Compute the average F1-score
|
72 |
avg_f1 = compute_f1_score(cm)
|
73 |
|