xairon commited on
Commit
8bfbb7f
·
verified ·
1 Parent(s): 4f05037

Upload notebooks/02_benchmark_analysis.ipynb with huggingface_hub

Browse files
notebooks/02_benchmark_analysis.ipynb CHANGED
@@ -367,35 +367,7 @@
367
  "execution_count": null,
368
  "metadata": {},
369
  "outputs": [],
370
- "source": [
371
- "for space_label, space_val in [(\"Univariate\", \"uni\"), (\"Multivariate\", \"multi\")]:\n",
372
- " sub = df[df[\"input_space\"] == space_val].sort_values(\"uniformity\").copy() # more negative = better\n",
373
- " if sub.empty:\n",
374
- " continue\n",
375
- "\n",
376
- " methods = sub[\"method\"].tolist()\n",
377
- " colors = method_colors(methods)\n",
378
- "\n",
379
- " fig = go.Figure()\n",
380
- " fig.add_trace(go.Bar(\n",
381
- " x=methods, y=sub[\"uniformity\"],\n",
382
- " marker_color=colors,\n",
383
- " text=sub[\"uniformity\"].round(2).astype(str),\n",
384
- " textposition=\"outside\",\n",
385
- " ))\n",
386
- "\n",
387
- " # Highlight collapse zone\n",
388
- " fig.add_hrect(y0=-0.5, y1=0, fillcolor=\"#ff000015\", line_width=0,\n",
389
- " annotation_text=\"Collapse zone\", annotation_position=\"top right\")\n",
390
- "\n",
391
- " fig.update_layout(\n",
392
- " **LAYOUT_DEFAULTS,\n",
393
- " title=f\"Uniformity (embedding spread) -- {space_label}\",\n",
394
- " yaxis_title=\"Uniformity (more negative = better)\",\n",
395
- " showlegend=False,\n",
396
- " )\n",
397
- " fig.show()"
398
- ]
399
  },
400
  {
401
  "cell_type": "markdown",
 
367
  "execution_count": null,
368
  "metadata": {},
369
  "outputs": [],
370
+ "source": "for space_label, space_val in [(\"Univariate\", \"uni\"), (\"Multivariate\", \"multi\")]:\n sub = df[df[\"input_space\"] == space_val].sort_values(\"uniformity\").copy() # more negative = better\n if sub.empty:\n continue\n\n methods = sub[\"method\"].tolist()\n colors = method_colors(methods)\n\n fig = go.Figure()\n fig.add_trace(go.Bar(\n x=methods, y=sub[\"uniformity\"],\n marker_color=colors,\n text=sub[\"uniformity\"].round(2).astype(str),\n textposition=\"outside\",\n ))\n\n # Highlight collapse zone\n fig.add_hrect(y0=-0.5, y1=0, fillcolor=\"rgba(255,0,0,0.08)\", line_width=0,\n annotation_text=\"Collapse zone\", annotation_position=\"top right\")\n\n fig.update_layout(\n **LAYOUT_DEFAULTS,\n title=f\"Uniformity (embedding spread) -- {space_label}\",\n yaxis_title=\"Uniformity (more negative = better)\",\n showlegend=False,\n )\n fig.show()"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
371
  },
372
  {
373
  "cell_type": "markdown",