<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Evaluation Metrics on 中文AI术语词典</title><link>https://terms-en.ai-term-hub.com/zh/tags/evaluation-metrics/</link><description>Recent content in Evaluation Metrics on 中文AI术语词典</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Sat, 18 Jul 2026 11:44:45 +0000</lastBuildDate><atom:link href="https://terms-en.ai-term-hub.com/zh/tags/evaluation-metrics/index.xml" rel="self" type="application/rss+xml"/><item><title>Phi系数</title><link>https://terms-en.ai-term-hub.com/zh/terms/phi_coefficient/</link><pubDate>Sat, 18 Jul 2026 11:30:05 +0000</pubDate><guid>https://terms-en.ai-term-hub.com/zh/terms/phi_coefficient/</guid><description>&lt;h2 id="definition">Definition&lt;/h2>
&lt;p>Phi系数（φ）是用于衡量两个二元变量之间关联程度的指标，可视为二值变量的皮尔逊相关系数。其取值范围为-1到+1，其中0表示无关联。&lt;/p>
&lt;h3 id="summary">Summary&lt;/h3>
&lt;p>衡量两个二元变量之间关联程度的统计指标。&lt;/p>
&lt;h2 id="key-concepts">Key Concepts&lt;/h2>
&lt;ul>
&lt;li>二元变量&lt;/li>
&lt;li>相关性&lt;/li>
&lt;li>列联表&lt;/li>
&lt;li>关联强度&lt;/li>
&lt;/ul>
&lt;h2 id="use-cases">Use Cases&lt;/h2>
&lt;ul>
&lt;li>评估二元分类器在准确率之外的性能&lt;/li>
&lt;li>分析具有“是/否”回复的调查数据中的关系&lt;/li>
&lt;li>在包含分类输入的数据集中进行特征选择&lt;/li>
&lt;/ul>
&lt;h2 id="code-example">Code Example&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> numpy &lt;span style="color:#66d9ef">as&lt;/span> np
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">from&lt;/span> scipy.stats &lt;span style="color:#f92672">import&lt;/span> chi2_contingency
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Example: Calculate phi coefficient from a 2x2 confusion matrix&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>tn, fp, fn, tp &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">90&lt;/span>, &lt;span style="color:#ae81ff">10&lt;/span>, &lt;span style="color:#ae81ff">5&lt;/span>, &lt;span style="color:#ae81ff">95&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>matrix &lt;span style="color:#f92672">=&lt;/span> [[tn, fp], [fn, tp]]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>chi2, p, dof, expected &lt;span style="color:#f92672">=&lt;/span> chi2_contingency(matrix)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>phi &lt;span style="color:#f92672">=&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>sqrt(chi2 &lt;span style="color:#f92672">/&lt;/span> (tn &lt;span style="color:#f92672">+&lt;/span> fp &lt;span style="color:#f92672">+&lt;/span> fn &lt;span style="color:#f92672">+&lt;/span> tp))
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#39;Phi coefficient: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>phi&lt;span style="color:#e6db74">:&lt;/span>&lt;span style="color:#e6db74">.3f&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#39;&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="related-terms">Related Terms&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://terms-en.ai-term-hub.com/en/terms/cramer-s-v-%E5%85%8B%E6%8B%89%E9%BB%98v%E7%B3%BB%E6%95%B0/">Cramer&amp;rsquo;s V (克拉默V系数)&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://terms-en.ai-term-hub.com/en/terms/pearson-correlation-%E7%9A%AE%E5%B0%94%E9%80%8A%E7%9B%B8%E5%85%B3%E7%B3%BB%E6%95%B0/">Pearson correlation (皮尔逊相关系数)&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://terms-en.ai-term-hub.com/en/terms/confusion-matrix-%E6%B7%B7%E6%B7%86%E7%9F%A9%E9%98%B5/">Confusion matrix (混淆矩阵)&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://terms-en.ai-term-hub.com/en/terms/mutual-information-%E4%BA%92%E4%BF%A1%E6%81%AF/">Mutual information (互信息)&lt;/a>&lt;/li>
&lt;/ul></description></item></channel></rss>