<?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>times series Archives - KDD Analytics</title>
	<atom:link href="https://www.kddanalytics.com/tag/times-series/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.kddanalytics.com/tag/times-series/</link>
	<description>Data to Decisions</description>
	<lastBuildDate>Sat, 24 Mar 2018 02:30:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://i0.wp.com/www.kddanalytics.com/wp-content/uploads/2016/08/cropped-imageedit_1_7939659602.png?fit=32%2C32&#038;ssl=1</url>
	<title>times series Archives - KDD Analytics</title>
	<link>https://www.kddanalytics.com/tag/times-series/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">114932494</site>	<item>
		<title>Practical Time Series Forecasting – Know When to Roll ‘em</title>
		<link>https://www.kddanalytics.com/practical-times-series-forecasting-rolling-holdout-sample/</link>
		
		<dc:creator><![CDATA[KDD]]></dc:creator>
		<pubDate>Mon, 29 Jan 2018 01:33:32 +0000</pubDate>
				<category><![CDATA[Data Analytics Methods]]></category>
		<category><![CDATA[Econometrics]]></category>
		<category><![CDATA[Forecasting]]></category>
		<category><![CDATA[Time Series]]></category>
		<category><![CDATA[forecast error]]></category>
		<category><![CDATA[holdout sample]]></category>
		<category><![CDATA[rolling analysis]]></category>
		<category><![CDATA[times series]]></category>
		<guid isPermaLink="false">http://www.kddanalytics.com/?p=1322</guid>

					<description><![CDATA[<p>“Prediction is very difficult, especially if it&#8217;s about the future.” ― Niels Bohr, physicist Holdout samples are a key component to estimating a “useful” forecasting model. Set aside data at least equal in length to your forecast horizon (“holdout sample”). Build your models on the remaining data (“modeling sample”). And compare the candidate models’ forecast&#8230;</p>
<p>The post <a href="https://www.kddanalytics.com/practical-times-series-forecasting-rolling-holdout-sample/">Practical Time Series Forecasting – Know When to Roll ‘em</a> appeared first on <a href="https://www.kddanalytics.com">KDD Analytics</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>“</strong><em>Prediction is very difficult, especially if it&#8217;s about the future.</em><strong>”<br />
― <a href="https://en.wikipedia.org/wiki/Niels_Bohr" target="_blank" rel="noopener">Niels Bohr</a></strong>, physicist</p>
<p><a href="https://www.kddanalytics.com/practical-time-series-forecasting-holdout-sample/" target="_blank" rel="noopener"><strong>Holdout samples</strong></a> are a key component to estimating a “useful” forecasting model. <strong>Set aside data at least equal in length to your forecast horizon</strong> (“holdout sample”). Build your models on the remaining data (“modeling sample”). And <strong>compare the candidate models’ forecast performance over the holdout sample.</strong></p>
<p>At a minimum, a single holdout sample should be used.</p>
<p>But to get a <strong>better sense of a model’s future performance, consider using multiple holdout samples</strong>.</p>
<p>This <strong>guards against</strong> basing your model on a <strong>holdout sample</strong> that is <strong>unrepresentative</strong> of the overall characteristics of the time series.</p>
<p>One way to achieve this is to use<strong> “rolling” holdout samples</strong>.</p>
<h3>Rolling analysis</h3>
<p>A <a href="https://link.springer.com/chapter/10.1007%2F978-0-387-32348-0_9" target="_blank" rel="noopener"><strong>rolling analysis</strong></a> of a time series is generally used to test a model’s stability. That is, <strong>are a model’s parameters stable across time</strong> or do they change, especially in a systematic way?</p>
<p>This is important for a forecasting model. We <strong>don’t want</strong> a forecasting model whose <strong>parameters</strong> are <strong>changing during the forecast horizon in an unexpected (i.e. unmodeled) manner.</strong></p>
<p>Suppose our forecast horizon is 6 months.</p>
<p><strong> Under a single holdout sample</strong>, we would <strong>set aside the last 6 months of data as the holdout sample</strong>. Then using the remaining data as the modeling sample, estimate models, forecast over the single holdout sample and compare the models’ performance.</p>
<p>This will help narrow down the pool of candidate models.</p>
<h4>Rolling holdout samples</h4>
<p>But under a rolling holdout approach, also called &#8220;<a href="http://otexts.org/fpp2/accuracy.html" target="_blank" rel="noopener"><strong>time series cross-validation</strong></a>,&#8221;  <strong>we would set aside a longer sample of data</strong>, say, the last 12 months. Then:</p>
<p><strong>Step 1:</strong>  Estimate a model and forecast over the <strong>first</strong> 6-months of this 12-month period (&#8220;roll 1&#8221;);</p>
<p><strong>Step 2:</strong>  Then add one 1 month to the tail-end of the estimation sample, recalibrate the model, and forecast over the subsequent 6-months (“roll 2”);</p>
<p><strong>Step 3:</strong>  Then add another month to the estimation sample, recalibrate and forecast over the subsequent 6-months (“roll 3”);</p>
<p><strong>Step 4:</strong>  Repeat until there are no more 6-month periods (&#8220;rolls&#8221;) remaining in the 12-month period.</p>
<p>So, <strong>in this example</strong>, we would have <strong>recalibrated our model 7 times</strong> (each with a modeling sample that is one additional month longer than the previous). And we would have <strong>made 7 forecasts over the rolling holdout periods</strong>.</p>
<p>The <strong>last &#8220;roll</strong>,&#8221; it turns out, <strong>is the same 6-month period</strong> we would have used <strong>under a single 6-month holdout sample case</strong>. So, we generate the stats for a standard single holdout sample during the course of this rolling holdout approach.</p>
<p>If we are examining multiple candidate models, this process can generate a lot of data. Below is an example of the rolling forecasts for one model.</p>
<p><img data-recalc-dims="1" decoding="async" loading="lazy" class="size-full wp-image-1325 aligncenter" src="https://i0.wp.com/www.kddanalytics.com/wp-content/uploads/2017/12/Rolling-Holdout-Samples.png?resize=561%2C547&#038;ssl=1" alt="Rolling Holdout Samples" width="561" height="547" srcset="https://i0.wp.com/www.kddanalytics.com/wp-content/uploads/2017/12/Rolling-Holdout-Samples.png?w=561&amp;ssl=1 561w, https://i0.wp.com/www.kddanalytics.com/wp-content/uploads/2017/12/Rolling-Holdout-Samples.png?resize=300%2C293&amp;ssl=1 300w" sizes="auto, (max-width: 561px) 100vw, 561px" /></p>
<h3>Summary roll statistics</h3>
<p>We could generate a similar chart for every model we are testing. But it is <strong>easier to work with measures of forecast accuracy and bias</strong>, such as <a href="https://www.kddanalytics.com/practical-time-series-forecasting-holdout-sample/" target="_blank" rel="noopener"><strong>MAPE</strong></a> and <a href="https://www.kddanalytics.com/practical-time-series-forecasting-holdout-sample/" target="_blank" rel="noopener"><strong>MPE</strong></a>.</p>
<p>For each roll forecast, we can calculate the MAPE and MPE and observe how they change across the rolling forecasts.</p>
<p>Are the MAPE and MPE constant? Fluctuate with no apparent trend? Or exhibit some systematic trend?</p>
<p>Doing this for every candidate model we are testing generates charts like this which can quickly show any areas of concern:</p>
<p><img data-recalc-dims="1" decoding="async" loading="lazy" class="size-full wp-image-1326 aligncenter" src="https://i0.wp.com/www.kddanalytics.com/wp-content/uploads/2017/12/Rolling-Holdout-Samples-MAPE.png?resize=604%2C370&#038;ssl=1" alt="" width="604" height="370" srcset="https://i0.wp.com/www.kddanalytics.com/wp-content/uploads/2017/12/Rolling-Holdout-Samples-MAPE.png?w=604&amp;ssl=1 604w, https://i0.wp.com/www.kddanalytics.com/wp-content/uploads/2017/12/Rolling-Holdout-Samples-MAPE.png?resize=300%2C184&amp;ssl=1 300w" sizes="auto, (max-width: 604px) 100vw, 604px" /></p>
<p>In this example, candidate models 18 and 15 may be worth further inspection since their MAPEs are much higher than the rest in a recent roll period (roll 6).</p>
<h3>What else makes a model useful?</h3>
<p>So, with respect to the <strong>guidelines</strong> for whittling down a pool of candidate models we listed in an <strong><a href="https://www.kddanalytics.com/practical-time-series-forecasting-what-makes-a-useful-model/" target="_blank" rel="noopener">earlier article</a></strong>, we can add the following from a rolling holdout analysis:</p>
<p><strong>Stability</strong> – The model’s parameters should retain their statistical significance and not vary too much across the rolling periods; and the model&#8217;s residuals should remain &#8220;<strong>white noise</strong>&#8221; across the rolls;</p>
<p><strong>Consistency of Performance</strong> – The model’s forecast accuracy and bias should not exhibit any strong trends, especially trends in the “wrong” direction (i.e. getting progressively worse) as the more recent time period is approached.</p>
<p><strong>Strong Rolling Holdout Sample Performance</strong> – The model’s forecast accuracy and bias, <strong>averaged across all the rolls</strong>, should be high and low respectively. That is <strong>both the average MAPE </strong>and<strong> MPE should be low</strong>.</p>
<h3>Benefits of Rolling</h3>
<p>The primary benefit of a rolling analysis is that we get to see <strong>how a model performs</strong> forecast-wise <strong>over multiple time spans</strong> equal in length to our forecast horizon; <strong>instead of relying on performance in just one holdout sample</strong>.</p>
<p>A rolling analysis also <strong>addresses the issue of a short holdout sample</strong> (e.g. short forecast horizon) <strong>possibly not being representative of the general character of the time series</strong>.</p>
<p>In addition, a rolling analysis can be used as a check for the “best” model chosen using a single holdout sample. That is, would you pick the same model using the rolling holdout approach? If not, why?</p>
<p>In sum, <strong>a model that is persistently better at holdout sample forecasting over a longer time frame is likely to be more robust.</strong></p>
<p>So, let ‘em roll!</p>
<p><a href="https://www.kddanalytics.com/practical-time-series-forecasting-introduction/" target="_blank" rel="noopener"><strong>Part 1 &#8211; Practical Time Series Forecasting &#8211; Introduction</strong></a></p>
<p><a href="https://www.kddanalytics.com/practical-time-series-forecasting-basics/" target="_blank" rel="noopener"><strong>Part 2 &#8211; Practical Time Series Forecasting &#8211; Some Basics</strong></a></p>
<p><a href="https://www.kddanalytics.com/practical-time-series-forecasting-useful-models/" target="_blank" rel="noopener"><strong>Part 3 &#8211; Practical Time Series Forecasting &#8211; Potentially Useful Models</strong></a></p>
<p><a href="https://www.kddanalytics.com/practical-time-series-forecasting-data-science-taxonomy/" target="_blank" rel="noopener"><strong>Part 4 &#8211; Practical Time Series Forecasting &#8211; Data Science Taxonomy</strong></a></p>
<p><a href="https://www.kddanalytics.com/practical-time-series-forecasting-holdout-sample/" target="_blank" rel="noopener"><strong>Part 5 &#8211; Practical Time Series Forecasting &#8211; Know When to Hold &#8217;em</strong></a></p>
<p><a href="https://www.kddanalytics.com/practical-time-series-forecasting-what-makes-a-useful-model/" target="_blank" rel="noopener"><strong>Part 6 &#8211; Practical Time Series Forecasting &#8211; What Makes a Model Useful?</strong></a></p>
<p><a href="https://www.kddanalytics.com/practical-time-series-forecasting-deterministic-stochastic-trend/" target="_blank" rel="noopener"><strong>Part 7 &#8211; Practical Time Series Forecasting &#8211; To Difference or Not to Difference</strong></a></p>
<p>&nbsp;</p>
<p>The post <a href="https://www.kddanalytics.com/practical-times-series-forecasting-rolling-holdout-sample/">Practical Time Series Forecasting – Know When to Roll ‘em</a> appeared first on <a href="https://www.kddanalytics.com">KDD Analytics</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1322</post-id>	</item>
	</channel>
</rss>
