Removing class match
Browse files
app.py
CHANGED
|
@@ -214,9 +214,9 @@ TabPFN outputs a **probability for each quality bin**, not a single score.
|
|
| 214 |
def format_index_gap(pred_index: float, actual_index: int) -> str:
|
| 215 |
diff = round(pred_index - actual_index, 1)
|
| 216 |
if diff == 0:
|
| 217 |
-
return "
|
| 218 |
direction = "above" if diff > 0 else "below"
|
| 219 |
-
return f"{
|
| 220 |
|
| 221 |
|
| 222 |
def format_prediction_summary(
|
|
@@ -237,7 +237,6 @@ def format_prediction_summary(
|
|
| 237 |
f"{explanation}"
|
| 238 |
)
|
| 239 |
|
| 240 |
-
class_match = "✅ Match" if pred_class == actual_class else "❌ Mismatch"
|
| 241 |
index_gap = format_index_gap(pred_index, actual_index)
|
| 242 |
|
| 243 |
return (
|
|
@@ -246,7 +245,6 @@ def format_prediction_summary(
|
|
| 246 |
f"|---|---|---|\n"
|
| 247 |
f"| **TabPFN prediction** | {pred_class} | **{pred_index}** |\n"
|
| 248 |
f"| **Ground truth** | {actual_class} | **{actual_index}** *(integer UCI score)* |\n"
|
| 249 |
-
f"| **Class result** | {class_match} | |\n"
|
| 250 |
f"| **Index gap** | | {index_gap} |\n"
|
| 251 |
f"{explanation}"
|
| 252 |
)
|
|
|
|
| 214 |
def format_index_gap(pred_index: float, actual_index: int) -> str:
|
| 215 |
diff = round(pred_index - actual_index, 1)
|
| 216 |
if diff == 0:
|
| 217 |
+
return "Exact match"
|
| 218 |
direction = "above" if diff > 0 else "below"
|
| 219 |
+
return f"{abs(diff):.1f} pt {direction} ground truth"
|
| 220 |
|
| 221 |
|
| 222 |
def format_prediction_summary(
|
|
|
|
| 237 |
f"{explanation}"
|
| 238 |
)
|
| 239 |
|
|
|
|
| 240 |
index_gap = format_index_gap(pred_index, actual_index)
|
| 241 |
|
| 242 |
return (
|
|
|
|
| 245 |
f"|---|---|---|\n"
|
| 246 |
f"| **TabPFN prediction** | {pred_class} | **{pred_index}** |\n"
|
| 247 |
f"| **Ground truth** | {actual_class} | **{actual_index}** *(integer UCI score)* |\n"
|
|
|
|
| 248 |
f"| **Index gap** | | {index_gap} |\n"
|
| 249 |
f"{explanation}"
|
| 250 |
)
|