Evaluate 文档

可视化方法

Hugging Face's logo
加入 Hugging Face 社区

并获得增强的文档体验

开始使用

可视化方法

用于可视化评估结果的方法

雷达图

evaluate.visualization.radar_plot

< >

( data model_names invert_range = [] config = None fig = None )

参数

  • data (List[dict]) — 结果(指标 + 值的列表)。例如 data = [{“accuracy”: 0.9, “precision”:0.8},{“accuracy”: 0.7, “precision”:0.6}]
  • names (List[dict]) — 模型名称。例如 names = [“model1”, “model 2”, …]
  • invert_range (List[dict], 可选) — 需要反转的指标(在值越小越好的情况下,例如速度)。例如 invert_range=[“latency_in_seconds”]
  • config (dict, 可选) — 格式化配置的规范,即:

    • rad_ln_args (dict, 默认为 {"visible": True}):径向(圆形)线的可见性。

    • outer_ring (dict, 默认为 {"visible": True}):外环的可见性。

    • angle_ln_args (dict, 默认为 {"visible": True}):角度线的可见性。

    • rgrid_tick_lbls_args (dict, 默认为 {"fontsize": 12}):刻度上刻度标签的字体大小。

    • theta_tick_lbls (dict, 默认为 {"fontsize": 12}):图上变量标签的字体大小。

    • theta_tick_lbls_pad (int, 默认为 3):图上变量标签的填充。

    • theta_tick_lbls_brk_lng_wrds (bool, 默认为 True ):标签中的长词是否被拆分。

    • theta_tick_lbls_txt_wrap (int, 默认为 15):刻度标签的文本换行。

    • incl_endpoint (bool, 默认为 False):在刻度上包含值端点。

    • marker (str, 默认为 "o"):雷达图中使用的标记形状。

    • markersize (int, 默认为 3):雷达图中使用的标记大小。

    • legend_loc (str, 默认为 "upper right"):雷达图中图例的位置。必须是:‘upper left’、‘upper right’、‘lower left’、‘lower right’ 之一。

    • bbox_to_anchor (tuple, 默认为 (2, 1):图例的锚点。

  • fig (matplotlib.figure.Figure, 可选) — 用于绘制雷达图的图形。

创建一个复杂的雷达图,其中每个变量都有不同的刻度。来源:https://towardsdatascience.com/how-to-create-and-visualize-complex-radar-charts-f7764d0f3652

< > 在 GitHub 上更新