<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Modelcomplexity on davethehuman.com</title><link>https://davethehuman.com/tags/modelcomplexity/</link><description>Recent content in Modelcomplexity on davethehuman.com</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2026 Dave the human</copyright><lastBuildDate>Thu, 08 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://davethehuman.com/tags/modelcomplexity/index.xml" rel="self" type="application/rss+xml"/><item><title>early stopping</title><link>https://davethehuman.com/notes/early-stopping/</link><pubDate>Thu, 08 Oct 2026 00:00:00 +0000</pubDate><guid>https://davethehuman.com/notes/early-stopping/</guid><description>&lt;p&gt;&lt;em&gt;Early stopping&lt;/em&gt; is a &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;regularization&lt;/a&gt; technique that stops training when performance on a &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;held-out&lt;/a&gt; validation set stops improving, helping prevent &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;overfitting&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;Training loss&lt;/a&gt; may keep decreasing while &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;validation loss&lt;/a&gt; begins to rise: the model is increasingly fitting details that do not &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;generalize&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A typical procedure monitors validation loss, saves the best &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;model checkpoint&lt;/a&gt;, and stops after a chosen number of evaluations without meaningful improvement. This waiting period is called &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;patience&lt;/a&gt;. The best checkpoint is then restored.&lt;/p&gt;
&lt;p&gt;Another way to apply early stopping is to monitor the algorithm &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;convergence&lt;/a&gt;: if further iterations barely change the parameters, we can stop when the largest absolute update of &lt;code&gt;w&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt; is below &lt;code&gt;tolerance&lt;/code&gt;. This is implemented in &lt;a href="https://davethehuman.com/notes/linear-regression-from-scratch/"&gt;Linear Regression from scratch&lt;/a&gt; and &lt;a href="https://davethehuman.com/notes/logistic-regression-from-scratch/"&gt;Logistic Regression from scratch&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>bias</title><link>https://davethehuman.com/notes/bias/</link><pubDate>Tue, 29 Sep 2026 00:00:00 +0000</pubDate><guid>https://davethehuman.com/notes/bias/</guid><description>&lt;p&gt;In statistics and machine learning, &lt;em&gt;Bias&lt;/em&gt; refers to the error coming from &lt;strong&gt;model oversimplification&lt;/strong&gt; and leading to &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;underfitting&lt;/a&gt;.&lt;br&gt;
A model with high bias is not able to capture the true complexity of the data, leading to poor performance on both &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;training set&lt;/a&gt; and &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;test set&lt;/a&gt;.&lt;br&gt;
The bias is represented by the difference between the expected or true value of the target variable and the predicted value of the model.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="auto"
 alt="bias"
 width="2000"
 height="1400"
 src="https://davethehuman.com/attachments/bias_hu_a002ee24658b6e18.png"
 srcset="https://davethehuman.com/attachments/bias_hu_a002ee24658b6e18.png 800w, https://davethehuman.com/attachments/bias_hu_139faac16c42beef.png 1280w"
 sizes="(min-width: 768px) 50vw, 65vw"
 data-zoom-src="https://davethehuman.com/attachments/bias.png"&gt;&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>bias-variance trade-off</title><link>https://davethehuman.com/notes/bias-variance-trade-off/</link><pubDate>Tue, 29 Sep 2026 00:00:00 +0000</pubDate><guid>https://davethehuman.com/notes/bias-variance-trade-off/</guid><description>&lt;p&gt;The &lt;em&gt;bias-variance trade-off&lt;/em&gt; describes the balance between learning the undelying pattern and being too sensitive to the particular training sample:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A model with &lt;strong&gt;high &lt;a href="https://davethehuman.com/notes/bias/"&gt;bias&lt;/a&gt;&lt;/strong&gt; is &lt;strong&gt;too simple&lt;/strong&gt;, makes &lt;strong&gt;too restrictive assumptions&lt;/strong&gt;, and consequently makes systematic errors; for example, a straight line cannot fully capture a curved relationship. This is associated with &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;underfitting&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;A model with &lt;strong&gt;high &lt;a href="https://davethehuman.com/notes/variance-ml/"&gt;variance (ML)&lt;/a&gt;&lt;/strong&gt; is &lt;strong&gt;too complex&lt;/strong&gt; and sensitive to the examples it sees. It may follow random fluctuations in the training data and perform poorly on new examples. This is associated with &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;overfitting&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="auto"
 alt="bias-variance trade-off"
 width="2000"
 height="1400"
 src="https://davethehuman.com/attachments/bias-variance-tradeoff_hu_583c2a944d8f9669.png"
 srcset="https://davethehuman.com/attachments/bias-variance-tradeoff_hu_583c2a944d8f9669.png 800w, https://davethehuman.com/attachments/bias-variance-tradeoff_hu_95956af941219322.png 1280w"
 sizes="(min-width: 768px) 50vw, 65vw"
 data-zoom-src="https://davethehuman.com/attachments/bias-variance-tradeoff.png"&gt;&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>variance (ML)</title><link>https://davethehuman.com/notes/variance-ml/</link><pubDate>Tue, 29 Sep 2026 00:00:00 +0000</pubDate><guid>https://davethehuman.com/notes/variance-ml/</guid><description>&lt;p&gt;In machine learning, &lt;em&gt;Variance&lt;/em&gt; refers to the error coming from the &lt;strong&gt;model being too complex&lt;/strong&gt; and leading to &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;overfitting&lt;/a&gt;.&lt;br&gt;
A model with high variance has a prediction error that changes a lot depending on the training input because it fits the &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;training set&lt;/a&gt; very closely; its performance drop dramatically on the &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;test set&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="auto"
 alt="variance"
 width="2000"
 height="1400"
 src="https://davethehuman.com/attachments/variance_hu_2dae1978c2f98ed2.png"
 srcset="https://davethehuman.com/attachments/variance_hu_2dae1978c2f98ed2.png 800w, https://davethehuman.com/attachments/variance_hu_dbf59a89c3c0219d.png 1280w"
 sizes="(min-width: 768px) 50vw, 65vw"
 data-zoom-src="https://davethehuman.com/attachments/variance.png"&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;Together with &lt;a href="https://davethehuman.com/notes/bias/"&gt;bias&lt;/a&gt;, this is a fundamental concept to understand the &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;bias-variance trade-off&lt;/a&gt;.&lt;/p&gt;</description></item></channel></rss>