<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>model evaluation &#8211; Od Informacji do Wiedzy</title>
	<atom:link href="https://profind.pl/en/tag/model-evaluation/feed/" rel="self" type="application/rss+xml" />
	<link>https://profind.pl</link>
	<description>Blog o informacjach na temat informacji i wiedzy</description>
	<lastBuildDate>Fri, 12 Dec 2025 17:10:05 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>
	<item>
		<title>From Experiment to Theory: How to Correctly Evaluate ML Model Performance</title>
		<link>https://profind.pl/en/2025/12/12/from-experiment-to-theory-how-to-correctly-evaluate-ml-model-performance/</link>
					<comments>https://profind.pl/en/2025/12/12/from-experiment-to-theory-how-to-correctly-evaluate-ml-model-performance/#respond</comments>
		
		<dc:creator><![CDATA[Marcin]]></dc:creator>
		<pubDate>Fri, 12 Dec 2025 17:10:05 +0000</pubDate>
				<category><![CDATA[Research diary]]></category>
		<category><![CDATA[cross validation]]></category>
		<category><![CDATA[data science]]></category>
		<category><![CDATA[generalization]]></category>
		<category><![CDATA[machine learning]]></category>
		<category><![CDATA[model evaluation]]></category>
		<category><![CDATA[model selection]]></category>
		<guid isPermaLink="false">https://profind.pl/?p=1983</guid>

					<description><![CDATA[In a typical machine learning experiment, we possess data that (in the simplest variant) is split into three disjoint sets: training, validation, and test. The training set allows for the estimation of model parameters (e.g., neural network weights, regression coefficients, distribution parameters in Naive Bayes, etc.) by minimizing a chosen loss function or maximizing likelihood. The goal [&#8230;]]]></description>
										<content:encoded><![CDATA[<p class="mb-4 break-words" style="text-align: justify;">In a typical machine learning experiment, we possess data that (in the simplest variant) is split into three disjoint sets: training, validation, and test. The <strong class="font-bold">training set</strong> allows for the estimation of model parameters (e.g., neural network weights, regression coefficients, distribution parameters in Naive Bayes, etc.) by minimizing a chosen loss function or maximizing likelihood. The goal of learning is not the &#8220;perfect mapping&#8221; of training data per se, but achieving good generalization—i.e., low error on new, unseen examples (assuming they originate from the same distribution as the training data).</p>
<p class="mb-4 break-words" style="text-align: justify;">In practice, during training, the model may start to overfit: the error on the training set continues to decrease, but performance on unseen data stops improving or even deteriorates. Therefore, we introduce a <strong class="font-bold">validation set</strong>, which is not used to fit parameters in a given training run, but rather for model selection and setting the learning process configuration (hyperparameters), as well as for procedures like <strong class="font-bold">early stopping</strong> (halting training when the loss or metric on the validation set stops improving).</p>
<p class="mb-4 break-words" style="text-align: justify;">Selecting the &#8220;best&#8221; model is usually done by minimizing loss or maximizing a chosen metric (Accuracy, F1, AUC, etc.) on the validation set. However, one must remember that intensive tuning (numerous trials of architectures, hyperparameters, random seeds, augmentations, preprocessing decisions) can lead to &#8220;overfitting to validation&#8221; and an overly optimistic evaluation. This is a form of <strong class="font-bold">selection bias</strong> in model selection.</p>
<p class="mb-4 break-words" style="text-align: justify;">The <strong class="font-bold">test set</strong> should be kept &#8220;for the end&#8221; and used only after the entire design process (model selection and hyperparameter tuning) is complete. The result on the test set serves as an estimation of the generalization error for the adopted protocol, but it is still an estimation subject to uncertainty (dependent, among other factors, on the test size and problem variance).</p>
<p class="mb-4 break-words" style="text-align: justify;">When data is scarce, or we require a more stable evaluation, resampling procedures are employed. Classically, <strong class="font-bold"><span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="mord mathnormal">k</span></span></span></span>-fold cross-validation</strong> (including leave-one-out as an extreme case) and bootstrap methods are used for prediction error estimation. Bootstrap (e.g., the <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="mord">.632</span><span class="mord">+</span></span></span></span> variant) is sometimes treated as a &#8220;smoothed&#8221; alternative to CV with a different bias–variance trade-off. If cross-validation serves both for hyperparameter tuning and for quality assessment, a <strong class="font-bold">nested cross-validation</strong> procedure is necessary to avoid optimistic bias. In this approach, the inner loop tunes hyperparameters, while the outer loop estimates the generalization error.</p>
<p class="mb-4 break-words" style="text-align: justify;">Empirical research consists of designing models and learning procedures and comparing them within a controlled protocol. The theoretical current is complementary: it provides formal frameworks where (under certain assumptions) one can obtain guarantees such as &#8220;with high probability, the true risk will not exceed a certain value,&#8221; dependent on the empirical risk and a measure of solution complexity. In particular, <strong class="font-bold">PAC-Bayes</strong> theory provides probabilistic upper bounds on the generalization error (often for stochastic/Gibbs classifiers) as a function of empirical error and a complexity term expressed, among others, by the Kullback-Leibler divergence (<span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="mord"><span class="mord mathnormal">D</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist"><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">K</span><span class="mord mathnormal mtight">L</span></span></span></span><span class="vlist-s">​</span></span></span></span></span></span></span></span>) between the posterior and prior distributions. This does not imply a simple deterministic relationship like <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="mord"><span class="mord mathnormal">E</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist"><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">v</span><span class="mord mathnormal mtight">a</span><span class="mord mathnormal mtight">l</span></span></span></span><span class="vlist-s">​</span></span></span></span></span><span class="mrel">≤</span></span><span class="base"><span class="mord"><span class="mord mathnormal">E</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist"><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">t</span><span class="mord mathnormal mtight">es</span><span class="mord mathnormal mtight">t</span></span></span></span><span class="vlist-s">​</span></span></span></span></span></span></span></span>; the relationship between validation and test errors depends on the selection protocol and can be biased by the model selection process.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://profind.pl/en/2025/12/12/from-experiment-to-theory-how-to-correctly-evaluate-ml-model-performance/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
