import{s as O,n as U,o as W}from"../chunks/scheduler.5f3e6389.js";import{S as B,i as J,e as h,s as l,c as x,h as K,a as g,d as a,b as r,f as F,g as b,j as A,k as R,l as V,m as o,n as $,t as z,o as w,p as T}from"../chunks/index.62df735e.js";import{C as Q,H as G,E as X}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.e306bd5b.js";import{D as Y}from"../chunks/Docstring.88e8f8ba.js";function Z(I){let n,y,v,k,s,q,d,C,c,N="Methods for visualizing evaluations results:",D,p,E,i,u,H,f,j=`Create a complex radar chart with different scales for each variable
Source: <a href="https://towardsdatascience.com/how-to-create-and-visualize-complex-radar-charts-f7764d0f3652" rel="nofollow">https://towardsdatascience.com/how-to-create-and-visualize-complex-radar-charts-f7764d0f3652</a>`,P,m,L,_,M;return s=new Q({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),d=new G({props:{title:"Visualization methods",local:"visualization-methods",headingTag:"h1"}}),p=new G({props:{title:"Radar Plot",local:"evaluate.visualization.radar_plot",headingTag:"h2"}}),u=new Y({props:{name:"evaluate.visualization.radar_plot",anchor:"evaluate.visualization.radar_plot",parameters:[{name:"data",val:""},{name:"model_names",val:""},{name:"invert_range",val:" = []"},{name:"config",val:" = None"},{name:"fig",val:" = None"}],parametersDescription:[{anchor:"evaluate.visualization.radar_plot.data",description:`<strong>data</strong> (<code>List[dict]</code>) &#x2014; the results (list of metric + value pairs).
E.g. data = [{&#x201C;accuracy&#x201D;: 0.9, &#x201C;precision&#x201D;:0.8},{&#x201C;accuracy&#x201D;: 0.7, &#x201C;precision&#x201D;:0.6}]`,name:"data"},{anchor:"evaluate.visualization.radar_plot.names",description:`<strong>names</strong> (<code>List[dict]</code>) &#x2014; model names.
E.g. names = [&#x201C;model1&#x201D;, &#x201C;model 2&#x201D;, &#x2026;]`,name:"names"},{anchor:"evaluate.visualization.radar_plot.invert_range",description:`<strong>invert_range</strong> (<code>List[dict]</code>, optional) &#x2014; the metrics to invert (in cases when smaller is better, e.g. speed)
E.g. invert_range=[&#x201C;latency_in_seconds&#x201D;]`,name:"invert_range"},{anchor:"evaluate.visualization.radar_plot.config",description:`<strong>config</strong> (<code>dict</code>, optional)  &#x2014; a specification of the formatting configurations, namely:</p>
<ul>
<li>
<p>rad_ln_args (<code>dict</code>, default <code>{&quot;visible&quot;: True}</code>): The visibility of the radial (circle) lines.</p>
</li>
<li>
<p>outer_ring (<code>dict</code>, default <code>{&quot;visible&quot;: True}</code>): The visibility of the outer ring.</p>
</li>
<li>
<p>angle_ln_args (<code>dict</code>, default <code>{&quot;visible&quot;: True}</code>): The visibility of the angle lines.</p>
</li>
<li>
<p>rgrid_tick_lbls_args (<code>dict</code>, default <code>{&quot;fontsize&quot;: 12}</code>): The font size of the tick labels on the scales.</p>
</li>
<li>
<p>theta_tick_lbls (<code>dict</code>, default <code>{&quot;fontsize&quot;: 12}</code>): The font size of the variable labels on the plot.</p>
</li>
<li>
<p>theta_tick_lbls_pad (<code>int</code>, default <code>3</code>): The padding of the variable labels on the plot.</p>
</li>
<li>
<p>theta_tick_lbls_brk_lng_wrds (<code>bool</code>, default <code>True</code> ): Whether long words in the label are broken up or not.</p>
</li>
<li>
<p>theta_tick_lbls_txt_wrap (<code>int</code>, default <code>15</code>): Text wrap for tick labels</p>
</li>
<li>
<p>incl_endpoint (<code>bool</code>, default <code>False</code>): Include value endpoints on calse</p>
</li>
<li>
<p>marker (<code>str</code>, default <code>&quot;o&quot;</code>): the shape of the marker used in the radar plot.</p>
</li>
<li>
<p>markersize (<code>int</code>, default <code>3</code>): the shape of the marker used in the radar plot.</p>
</li>
<li>
<p>legend_loc (<code>str</code>, default <code>&quot;upper right&quot;</code>): the location of the legend in the radar plot. Must be one of: &#x2018;upper left&#x2019;, &#x2018;upper right&#x2019;, &#x2018;lower left&#x2019;, &#x2018;lower right&#x2019;.</p>
</li>
<li>
<p>bbox_to_anchor (<code>tuple</code>, default <code>(2, 1)</code>: anchor for the legend.</p>
</li>
</ul>`,name:"config"},{anchor:"evaluate.visualization.radar_plot.fig",description:"<strong>fig</strong> (<code>matplotlib.figure.Figure</code>, optional) &#x2014; figure used to plot the radar plot.",name:"fig"}],source:"https://github.com/huggingface/evaluate/blob/main/src/evaluate/visualization.py#L138",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>matplotlib.figure.Figure</code></p>
`}}),m=new X({props:{source:"https://github.com/huggingface/evaluate/blob/main/docs/source/package_reference/visualization_methods.mdx"}}),{c(){n=h("meta"),y=l(),v=h("p"),k=l(),x(s.$$.fragment),q=l(),x(d.$$.fragment),C=l(),c=h("p"),c.textContent=N,D=l(),x(p.$$.fragment),E=l(),i=h("div"),x(u.$$.fragment),H=l(),f=h("p"),f.innerHTML=j,P=l(),x(m.$$.fragment),L=l(),_=h("p"),this.h()},l(e){const t=K("svelte-u9bgzb",document.head);n=g(t,"META",{name:!0,content:!0}),t.forEach(a),y=r(e),v=g(e,"P",{}),F(v).forEach(a),k=r(e),b(s.$$.fragment,e),q=r(e),b(d.$$.fragment,e),C=r(e),c=g(e,"P",{"data-svelte-h":!0}),A(c)!=="svelte-l0fsuf"&&(c.textContent=N),D=r(e),b(p.$$.fragment,e),E=r(e),i=g(e,"DIV",{class:!0});var S=F(i);b(u.$$.fragment,S),H=r(S),f=g(S,"P",{"data-svelte-h":!0}),A(f)!=="svelte-15m4dvt"&&(f.innerHTML=j),S.forEach(a),P=r(e),b(m.$$.fragment,e),L=r(e),_=g(e,"P",{}),F(_).forEach(a),this.h()},h(){R(n,"name","hf:doc:metadata"),R(n,"content",ee),R(i,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){V(document.head,n),o(e,y,t),o(e,v,t),o(e,k,t),$(s,e,t),o(e,q,t),$(d,e,t),o(e,C,t),o(e,c,t),o(e,D,t),$(p,e,t),o(e,E,t),o(e,i,t),$(u,i,null),V(i,H),V(i,f),o(e,P,t),$(m,e,t),o(e,L,t),o(e,_,t),M=!0},p:U,i(e){M||(z(s.$$.fragment,e),z(d.$$.fragment,e),z(p.$$.fragment,e),z(u.$$.fragment,e),z(m.$$.fragment,e),M=!0)},o(e){w(s.$$.fragment,e),w(d.$$.fragment,e),w(p.$$.fragment,e),w(u.$$.fragment,e),w(m.$$.fragment,e),M=!1},d(e){e&&(a(y),a(v),a(k),a(q),a(C),a(c),a(D),a(E),a(i),a(P),a(L),a(_)),a(n),T(s,e),T(d,e),T(p,e),T(u),T(m,e)}}}const ee='{"title":"Visualization methods","local":"visualization-methods","sections":[{"title":"Radar Plot","local":"evaluate.visualization.radar_plot","sections":[],"depth":2}],"depth":1}';function te(I){return W(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class le extends B{constructor(n){super(),J(this,n,te,Z,O,{})}}export{le as component};
