<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://qbase.texpertssolutions.com/index.php?action=history&amp;feed=atom&amp;title=Weighted_F1</id>
	<title>Weighted F1 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://qbase.texpertssolutions.com/index.php?action=history&amp;feed=atom&amp;title=Weighted_F1"/>
	<link rel="alternate" type="text/html" href="https://qbase.texpertssolutions.com/index.php?title=Weighted_F1&amp;action=history"/>
	<updated>2026-05-15T11:19:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://qbase.texpertssolutions.com/index.php?title=Weighted_F1&amp;diff=232&amp;oldid=prev</id>
		<title>Thakshashila: /* SEO Keywords */</title>
		<link rel="alternate" type="text/html" href="https://qbase.texpertssolutions.com/index.php?title=Weighted_F1&amp;diff=232&amp;oldid=prev"/>
		<updated>2025-06-10T06:26:19Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;SEO Keywords&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:26, 10 June 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l84&quot;&gt;Line 84:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 84:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;weighted f1 score, f1 score for imbalanced data, machine learning multi-class metrics, class imbalance performance metric, weighted average f1, scikit-learn f1 weighted, macro vs weighted f1&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;weighted f1 score, f1 score for imbalanced data, machine learning multi-class metrics, class imbalance performance metric, weighted average f1, scikit-learn f1 weighted, macro vs weighted f1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Artificial Intelligence]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Thakshashila</name></author>
	</entry>
	<entry>
		<id>https://qbase.texpertssolutions.com/index.php?title=Weighted_F1&amp;diff=183&amp;oldid=prev</id>
		<title>Thakshashila: /* Related Pages */</title>
		<link rel="alternate" type="text/html" href="https://qbase.texpertssolutions.com/index.php?title=Weighted_F1&amp;diff=183&amp;oldid=prev"/>
		<updated>2025-06-10T05:49:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Related Pages&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 05:49, 10 June 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l74&quot;&gt;Line 74:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 74:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[F1 Score]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[F1 Score]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Macro F1 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Score&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Macro F1]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Micro F1 Score]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Micro F1 Score]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Precision]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Precision]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Thakshashila</name></author>
	</entry>
	<entry>
		<id>https://qbase.texpertssolutions.com/index.php?title=Weighted_F1&amp;diff=164&amp;oldid=prev</id>
		<title>Thakshashila: Created page with &quot;= Weighted F1 Score =  The &#039;&#039;&#039;Weighted F1 Score&#039;&#039;&#039; is a metric used in multi-class classification to evaluate model performance by computing the F1 Score for each class and taking the average, weighted by the number of true instances for each class (i.e., the class &quot;support&quot;).  It is especially useful when working with &#039;&#039;&#039;imbalanced datasets&#039;&#039;&#039;, where some classes are more frequent than others.  == Definition ==  :&lt;math&gt; \text{Weighted F1} = \sum_{i=1}^{C} w_i \cdot F1_i...&quot;</title>
		<link rel="alternate" type="text/html" href="https://qbase.texpertssolutions.com/index.php?title=Weighted_F1&amp;diff=164&amp;oldid=prev"/>
		<updated>2025-06-10T05:25:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Weighted F1 Score =  The &amp;#039;&amp;#039;&amp;#039;Weighted F1 Score&amp;#039;&amp;#039;&amp;#039; is a metric used in multi-class classification to evaluate model performance by computing the F1 Score for each class and taking the average, weighted by the number of true instances for each class (i.e., the class &amp;quot;support&amp;quot;).  It is especially useful when working with &amp;#039;&amp;#039;&amp;#039;imbalanced datasets&amp;#039;&amp;#039;&amp;#039;, where some classes are more frequent than others.  == Definition ==  :&amp;lt;math&amp;gt; \text{Weighted F1} = \sum_{i=1}^{C} w_i \cdot F1_i...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Weighted F1 Score =&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Weighted F1 Score&amp;#039;&amp;#039;&amp;#039; is a metric used in multi-class classification to evaluate model performance by computing the F1 Score for each class and taking the average, weighted by the number of true instances for each class (i.e., the class &amp;quot;support&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
It is especially useful when working with &amp;#039;&amp;#039;&amp;#039;imbalanced datasets&amp;#039;&amp;#039;&amp;#039;, where some classes are more frequent than others.&lt;br /&gt;
&lt;br /&gt;
== Definition ==&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \text{Weighted F1} = \sum_{i=1}^{C} w_i \cdot F1_i &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
* &amp;lt;math&amp;gt; C &amp;lt;/math&amp;gt; = Number of classes&lt;br /&gt;
* &amp;lt;math&amp;gt; F1_i &amp;lt;/math&amp;gt; = F1 Score for class &amp;lt;math&amp;gt; i &amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt; w_i = \frac{\text{Number of true instances in class } i}{\text{Total number of instances}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Key Features ==&lt;br /&gt;
&lt;br /&gt;
* Classes with more data have more influence on the final score.&lt;br /&gt;
* Helps prevent small classes from skewing the result disproportionately.&lt;br /&gt;
* Often the default setting in many ML libraries like Scikit-learn (Python).&lt;br /&gt;
&lt;br /&gt;
== Simple Example ==&lt;br /&gt;
&lt;br /&gt;
Suppose a dataset has three classes with these F1 Scores and supports:&lt;br /&gt;
&lt;br /&gt;
* F1(Class A) = 0.90, Support = 50  &lt;br /&gt;
* F1(Class B) = 0.70, Support = 30  &lt;br /&gt;
* F1(Class C) = 0.50, Support = 20  &lt;br /&gt;
&lt;br /&gt;
First calculate total support:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \text{Total} = 50 + 30 + 20 = 100 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now calculate weighted F1:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \text{Weighted F1} = \frac{50}{100} \cdot 0.90 + \frac{30}{100} \cdot 0.70 + \frac{20}{100} \cdot 0.50 &amp;lt;/math&amp;gt;  &lt;br /&gt;
:&amp;lt;math&amp;gt; = 0.45 + 0.21 + 0.10 = 0.76 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So the Weighted F1 Score is **0.76**, favoring the majority class&amp;#039;s performance.&lt;br /&gt;
&lt;br /&gt;
== Weighted vs Macro vs Micro F1 ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Metric&lt;br /&gt;
! Weighting&lt;br /&gt;
! Best For&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Macro F1&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Equal weight for all classes&lt;br /&gt;
| Equal treatment for each class&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Micro F1&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Global average over all TP, FP, FN&lt;br /&gt;
| Imbalanced data, overall performance&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Weighted F1&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Weighted by class support&lt;br /&gt;
| Imbalanced datasets, with performance emphasis on larger classes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
* **Text classification** (e.g., news topics, sentiment analysis)&lt;br /&gt;
* **Image classification** where some labels are rare&lt;br /&gt;
* **Healthcare diagnosis** with rare but critical outcomes&lt;br /&gt;
* **Customer segmentation** with uneven population groups&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
* Might mask poor performance on minority classes if the model performs well on dominant ones.&lt;br /&gt;
* If class fairness is a concern, [[Macro F1 Score]] might be more appropriate.&lt;br /&gt;
&lt;br /&gt;
== Related Pages ==&lt;br /&gt;
&lt;br /&gt;
* [[F1 Score]]&lt;br /&gt;
* [[Macro F1 Score]]&lt;br /&gt;
* [[Micro F1 Score]]&lt;br /&gt;
* [[Precision]]&lt;br /&gt;
* [[Recall]]&lt;br /&gt;
* [[Confusion Matrix]]&lt;br /&gt;
* [[Accuracy]]&lt;br /&gt;
&lt;br /&gt;
== SEO Keywords ==&lt;br /&gt;
&lt;br /&gt;
weighted f1 score, f1 score for imbalanced data, machine learning multi-class metrics, class imbalance performance metric, weighted average f1, scikit-learn f1 weighted, macro vs weighted f1&lt;/div&gt;</summary>
		<author><name>Thakshashila</name></author>
	</entry>
</feed>