<?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>Archives Intermittent demand - OpenForecast</title>
	<atom:link href="https://openforecast.org/category/forecasting-theory/intermittent-demand/feed/" rel="self" type="application/rss+xml" />
	<link>https://openforecast.org/category/forecasting-theory/intermittent-demand/</link>
	<description>How to look into the future</description>
	<lastBuildDate>Wed, 12 Aug 2026 12:17:02 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>

<image>
	<url>https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/07/cropped-of-logo-short-1-32x32.png&amp;nocache=1</url>
	<title>Archives Intermittent demand - OpenForecast</title>
	<link>https://openforecast.org/category/forecasting-theory/intermittent-demand/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>SBC is not for you!</title>
		<link>https://openforecast.org/2025/06/04/sbc-is-not-for-you/</link>
					<comments>https://openforecast.org/2025/06/04/sbc-is-not-for-you/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Wed, 04 Jun 2025 11:41:00 +0000</pubDate>
				<category><![CDATA[Intermittent demand]]></category>
		<category><![CDATA[Social media]]></category>
		<category><![CDATA[Theory of forecasting]]></category>
		<category><![CDATA[intermittent demand]]></category>
		<category><![CDATA[theory]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=3853</guid>

					<description><![CDATA[<p>I&#8217;ve been acting as a reviewer lately, providing comments on papers about intermittent demand, and I’ve felt a bit frustrated by what some authors write. Let me explain. Several papers I reviewed claim that demand can be either intermittent or lumpy. They then mention the Syntetos-Boylan-Croston (SBC) classification and use the thresholds from Syntetos et ... <a title="SBC is not for you!" class="read-more" href="https://openforecast.org/2025/06/04/sbc-is-not-for-you/" aria-label="Read more about SBC is not for you!">Read more</a></p>
<p>Message <a href="https://openforecast.org/2025/06/04/sbc-is-not-for-you/">SBC is not for you!</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve been acting as a reviewer lately, providing comments on papers about intermittent demand, and I’ve felt a bit frustrated by what some authors write. Let me explain.</p>
<p>Several papers I reviewed claim that demand can be either intermittent or lumpy. They then mention the Syntetos-Boylan-Croston (SBC) classification and use the thresholds from Syntetos et al. (2005: ) to do some things with ML methods. Sounds reasonable?</p>
<p>No! And here’s why.</p>
<p>Actually, I’ve already explained this in <a href="/2024/07/16/intermittent-demand-classifications-is-that-what-you-need/">a previous post</a>, but let me summarise the main points again.</p>
<p>First, intermittent demand is the demand that happens at irregular frequency. That’s the definition John Boylan and I came up with in our paper (<a href="/2023/09/08/iets-state-space-model-for-intermittent-demand-forecasting/">this one</a>). But even before that, the literature generally agreed: if you observe naturally occurring zeroes (e.g., no one wants to buy a product), then the demand is intermittent &#8211; even if there’s only one zero in the data.</p>
<p>Now, <a href="https://doi.org/10.1057/palgrave.jors.2601841">Syntetos et al. (2005)</a> specifically studied <strong>intermittent demand</strong> and proposed a classification to help choose between Croston’s method and SBA. Their classification includes four types (see image in the post):</p>
<ol>
<li>Erratic but not very intermittent</li>
<li>Smooth</li>
<li>Lumpy</li>
<li>Intermittent but not very erratic</li>
</ol>
<p>The thresholds they used (ADI=1.32 and CV²=0.49) were <strong>only</strong> intended to guide the choice between Croston and SBA. And &#8220;lumpy&#8221;, as you can see, is just a special case of intermittent demand!</p>
<p>Yes, you can classify intermittent demand into &#8220;lumpy&#8221; and &#8220;smooth&#8221;, but this separation is not well-defined. Use a different classification (e.g., <a href="https://openforecast.org/2025/04/11/svetunkov-sroginis-2025-model-based-demand-classification/">this paper</a>) and you&#8217;ll get different results. In fact, practically speaking, your ML approach likely doesn’t need this classification at all.</p>
<p>So, here are a two things you should <strong>NOT DO</strong>:</p>
<ol>
<li>Saying that demand can be &#8220;intermittent&#8221; or &#8220;lumpy&#8221; &#8211; the latter is a subset of the former.</li>
<li>Use ADI=1.32 and/or CV²=0.49 to categorise demand, unless you&#8217;re selecting between Croston and SBA. And let’s be honest, you’re probably not doing that. So forget about it!</li>
</ol>
<p>And honestly, stop overusing SBC! Lately, I&#8217;ve seen more harm than good from it. If you really want to use it, make sure you’ve read carefully and understood the original paper.</p>
<p>But if you don&#8217;t know what you are doing, SBC is not for you!</p>
<p>Message <a href="https://openforecast.org/2025/06/04/sbc-is-not-for-you/">SBC is not for you!</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2025/06/04/sbc-is-not-for-you/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Svetunkov &#038; Sroginis (2025) &#8211; Model Based Demand Classification</title>
		<link>https://openforecast.org/2025/04/11/svetunkov-sroginis-2025-model-based-demand-classification/</link>
					<comments>https://openforecast.org/2025/04/11/svetunkov-sroginis-2025-model-based-demand-classification/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Fri, 11 Apr 2025 10:39:30 +0000</pubDate>
				<category><![CDATA[Intermittent demand]]></category>
		<category><![CDATA[Papers]]></category>
		<category><![CDATA[Social media]]></category>
		<category><![CDATA[extrapolation methods]]></category>
		<category><![CDATA[intermittent demand]]></category>
		<category><![CDATA[papers]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=3821</guid>

					<description><![CDATA[<p>For the last year, Anna Sroginis and I have been working on a paper, trying to modernise demand classification schemes and make them useful in the brave new era of machine learning. We have finally wrapped it up and submitted it to a peer-reviewed journal. But the temptation to share was too strong, so we ... <a title="Svetunkov &#038; Sroginis (2025) &#8211; Model Based Demand Classification" class="read-more" href="https://openforecast.org/2025/04/11/svetunkov-sroginis-2025-model-based-demand-classification/" aria-label="Read more about Svetunkov &#038; Sroginis (2025) &#8211; Model Based Demand Classification">Read more</a></p>
<p>Message <a href="https://openforecast.org/2025/04/11/svetunkov-sroginis-2025-model-based-demand-classification/">Svetunkov &#038; Sroginis (2025) &#8211; Model Based Demand Classification</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>For the last year, Anna Sroginis and I have been working on a paper, trying to modernise demand classification schemes and make them useful in the brave new era of machine learning. We have finally wrapped it up and submitted it to a peer-reviewed journal. But the temptation to share was too strong, so we have also uploaded it to arXiv, and it is <a href="https://doi.org/10.48550/arXiv.2504.05894">now available here</a>.</p>
<p>What is this paper about?</p>
<p>Intermittent demand is a common challenge in sectors like supply chain and retail. But the key issue is that zeroes in sales can happen for two fundamentally different reasons (<a href="/2024/11/18/why-zeroes-happen/">see one of my previous posts</a>):</p>
<ul>
<li>Nobody wanted to buy the product (naturally occurring zeroes),</li>
<li>Nobody could buy the product (artificially occurring due to stockouts, etc).</li>
</ul>
<p>However, forecasting methods are typically unaware of this distinction and treat both types equally. This can lead to inaccurate forecasts and poor decisions. On top of that, existing classification schemes for intermittent demand (<a href="/2024/07/16/intermittent-demand-classifications-is-that-what-you-need/">such as SBC</a>) use arbitrary thresholds and rely on choosing between forecasting methods like Croston and SBA. There’s a clear need for smarter, more flexible tools that can distinguish between types of demand and make classifications practical.</p>
<p>In this paper, we introduce a two-stage, model-based framework called &#8220;Automatic Identification of Demand&#8221; (AID), designed to bring more clarity and accuracy to demand classification. The first stage uses a data-driven approach to detect artificially occurring zeroes. Once those are accounted for, the second stage classifies the demand into one of six categories based on key characteristics: whether the demand is regular or intermittent, whether it consists of count or fractional values, and whether intermittent demand is smooth or lumpy in nature. AID detects stockouts by analysing demand intervals using the Geometric distribution, then flags the demand as one of those six types based on several simple statistical models.</p>
<p>We applied AID to a retailer dataset covering over 31,000 products with weekly sales across three stores. Based on that, we generated several features and tested multiple approaches (local level, pooled regression, and LightGBM) to see whether their accuracy improved. We found that:</p>
<ol>
<li>Correcting for stockouts significantly improved the accuracy of all approaches;</li>
<li>Using a mixture approach (separating demand into sizes and occurrences) yielded large gains in accuracy, regardless of the forecasting method used;</li>
<li>Further splitting the data by demand categories (e.g., regular vs. intermittent, smooth vs. lumpy) provided additional, though more modest, benefits.</li>
</ol>
<p>We argue that these three principles are universally valuable for forecasting, no matter what approach you use. If you face intermittent demand, at a minimum, consider detecting stockouts and then using the mixture approach.</p>
<p>Hope you find this paper useful. Let me know what you think in the comments.</p>
<p>Message <a href="https://openforecast.org/2025/04/11/svetunkov-sroginis-2025-model-based-demand-classification/">Svetunkov &#038; Sroginis (2025) &#8211; Model Based Demand Classification</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2025/04/11/svetunkov-sroginis-2025-model-based-demand-classification/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Don’t use MAE-based error measures for intermittent demand!</title>
		<link>https://openforecast.org/2025/01/21/don-t-use-mae-based-error-measures-for-intermittent-demand/</link>
					<comments>https://openforecast.org/2025/01/21/don-t-use-mae-based-error-measures-for-intermittent-demand/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Tue, 21 Jan 2025 12:02:06 +0000</pubDate>
				<category><![CDATA[Forecast evaluation]]></category>
		<category><![CDATA[Intermittent demand]]></category>
		<category><![CDATA[Social media]]></category>
		<category><![CDATA[Theory of forecasting]]></category>
		<category><![CDATA[error measures]]></category>
		<category><![CDATA[intermittent demand]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=3768</guid>

					<description><![CDATA[<p>I’m currently doing a literature review for one of my papers on intermittent demand forecasting with machine learning, and I’ve noticed a recurring fundamental mistake in several recently published papers, even in respectable peer-reviewed journals. The mistake? Using error measures based on the Mean Absolute Error (MAE). This is a crime against the humanity when ... <a title="Don’t use MAE-based error measures for intermittent demand!" class="read-more" href="https://openforecast.org/2025/01/21/don-t-use-mae-based-error-measures-for-intermittent-demand/" aria-label="Read more about Don’t use MAE-based error measures for intermittent demand!">Read more</a></p>
<p>Message <a href="https://openforecast.org/2025/01/21/don-t-use-mae-based-error-measures-for-intermittent-demand/">Don’t use MAE-based error measures for intermittent demand!</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I’m currently doing a literature review for one of my papers on intermittent demand forecasting with machine learning, and I’ve noticed a recurring fundamental mistake in several recently published papers, even in respectable peer-reviewed journals.</p>
<p>The mistake? Using error measures based on the Mean Absolute Error (MAE). This is a crime against the humanity when working with intermittent demand. I’ve explained this issue multiple times before (<a href="/2019/08/25/are-you-sure-youre-precise-measuring-accuracy-of-point-forecasts/">here</a>, <a href="/2024/04/03/stop-reporting-several-error-measures-just-for-the-sake-of-them/">here</a>, and <a href="/2024/07/16/point-forecast-evaluation-state-of-the-art/">here</a>), but it appears that this idea needs to be repeated over and over again. Let me explain.</p>
<p>MAE is minimised by the median. In the case of intermittent demand, the median can often be zero. If you use MAE (or scaled measures like MASE or sMAE) to evaluate forecasts and compare, for example, Croston, TSB, ETS, and an Artificial Neural Network (ANN), you may find the ANN outperforming the others. However, this could simply mean that the ANN produces forecasts closer to zero than the alternatives. This is not what you want for intermittent demand! The goal is to capture the structure correctly and produce conditional mean forecasts (typically). Instead, by relying on MAE, you might conclude: &#8220;We won’t sell anything in the next two weeks&#8221;, implying that there’s no need to stock products. This is apparently wrong and unhelpful.</p>
<p>Attached to this post is a figure showing three forecasts for an intermittent demand series:</p>
<ul>
<li>The blue line represents the mean of the data;</li>
<li>The green line is a forecast from an Artificial Neural Network;</li>
<li>The red line is the zero forecast.</li>
</ul>
<p>In the figure’s legend, you’ll see error measures indicating that the zero forecast performs best in terms of MAE, followed by the ANN, and lastly, the mean forecast. Based on MAE, the conclusion would be: &#8220;We won’t sell anything, so don’t bother stocking the product&#8221;. But this outcome occurs solely because 12 out of 20 values in the holdout are zeros, making the median zero as well.</p>
<p>On the other hand, RMSE provides a more reasonable evaluation, showing that the mean of the data is more informative and preferable to the other methods.</p>
<p>The brief summary of this post is: *Don’t use MAE-based error measures for intermittent demand!* (Insert as many exclamation marks as you’d like!)</p>
<p>P.S. Actually, as a general rule, avoid using MAE for evaluating methods that produce mean forecasts. For more details, check out <a href="/2024/04/03/stop-reporting-several-error-measures-just-for-the-sake-of-them/">this post</a>.</p>
<p>P.P.S What frustrates me a lot is that the reviewers of those papers did nothing to fix this issue, which means that they are clueless about that as well.</p>
<p>Message <a href="https://openforecast.org/2025/01/21/don-t-use-mae-based-error-measures-for-intermittent-demand/">Don’t use MAE-based error measures for intermittent demand!</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2025/01/21/don-t-use-mae-based-error-measures-for-intermittent-demand/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Intermittent demand: don&#8217;t try to predict WHEN it will happen</title>
		<link>https://openforecast.org/2024/12/11/intermittent-demand-don-t-try-to-predict-when-it-will-happen/</link>
					<comments>https://openforecast.org/2024/12/11/intermittent-demand-don-t-try-to-predict-when-it-will-happen/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Wed, 11 Dec 2024 10:50:26 +0000</pubDate>
				<category><![CDATA[Intermittent demand]]></category>
		<category><![CDATA[Social media]]></category>
		<category><![CDATA[Theory of forecasting]]></category>
		<category><![CDATA[extrapolation methods]]></category>
		<category><![CDATA[intermittent demand]]></category>
		<category><![CDATA[theory]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=3748</guid>

					<description><![CDATA[<p>I&#8217;ve seen several times ML experts applying principles of classification for intermittent demand forecasting. For example, they try predicting, WHEN the demand will happen. This is not a very sensible thing to do. The featured image in this post shows two forecasting approaches: one that tries to predict when demand happens (the yellow line), and ... <a title="Intermittent demand: don&#8217;t try to predict WHEN it will happen" class="read-more" href="https://openforecast.org/2024/12/11/intermittent-demand-don-t-try-to-predict-when-it-will-happen/" aria-label="Read more about Intermittent demand: don&#8217;t try to predict WHEN it will happen">Read more</a></p>
<p>Message <a href="https://openforecast.org/2024/12/11/intermittent-demand-don-t-try-to-predict-when-it-will-happen/">Intermittent demand: don&#8217;t try to predict WHEN it will happen</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve seen several times ML experts applying principles of classification for intermittent demand forecasting. For example, they try predicting, WHEN the demand will happen. This is not a very sensible thing to do.</p>
<p>The featured image in this post shows two forecasting approaches: one that tries to predict when demand happens (the yellow line), and the other one that tries capturing the structure of the demand and extrapolates it (the blue line). The green line shows the values in the holdout, and the RMSE indicates the error of the two approaches. Apparently, the straight line is better in this example. Let&#8217;s discuss why.</p>
<p>Just a reminder, intermittent demand is the demand that happens at irregular frequency. By definition, we cannot know when a person will come to our store and buy the product. We operate with probabilities in this case, and can say sometimes that the probability of purchase goes up or down due to some factors (seasonality, holidays, promotion etc). When a spherical ML expert in vacuum hears about probability, the first thing that pops to their mind is the &#8220;decision boundary&#8221; for classification task. Why not set some threshold and say that if the probability is higher than that, the product will be bought and in the other case it won&#8217;t?</p>
<p>Well, while this works in classification, it typically doesn&#8217;t make sense in demand forecasting.</p>
<p>First, there&#8217;s not much structure to capture in intermittent demand besides the basic level, external factors, such as promotions and calendar effects, and occasional trend. Yes, some of them might change the probability of occurrence, and, for example, show that a product will be bought on Monday with 90% probability. This still does not mean that the product will be indeed bought. Saying that it will is just informed guessing, not forecasting.</p>
<p>Second, point forecast is supposed to capture the structure and filter out the noise (see <a href="/2024/08/13/structure-vs-noise-a-fundamental-concept-in-forecasting/">this post</a>). In case of intermittent demand, the structure consists of two parts: expected occurrence (probability) and demand sizes. If we substitute the probability with zeroes and ones based on some threshold, we&#8217;ll end up overfitting the noise, but on a different level than usually: the future is uncertain and we can never say for sure what will happen and when, yet we would be playing a guessing game, hoping to be correct. It is like tossing a coin, trying to guess how it will land next time. If you want to have an expectation in that experiment, you should have probability, not a sequence of zeroes and ones.</p>
<p>Third and most important, working with intermittent demand, we typically want to solve a specific problem. The classical example is inventory management, in which case we don&#8217;t care whether customers will come and buy our product on Monday, instead of Tuesday. We care about having enough product on shelves to satisfy customers throughout a period of time, while our product is being delivered (lead time). So, the goal in this case is to identify the appropriate safety stock level based on the current stock and thus get an estimate of the demand over lead time, not to predict when people come and how much they will buy. Focusing on the point forecast in this setting is a futile task.</p>
<p>So, when working with intermittent demand, don&#8217;t waste your time on trying to forecast when the demand will happen. Focus instead on getting the structure correctly and then understanding what is needed by decision makers and how it will be used.</p>
<p>Message <a href="https://openforecast.org/2024/12/11/intermittent-demand-don-t-try-to-predict-when-it-will-happen/">Intermittent demand: don&#8217;t try to predict WHEN it will happen</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2024/12/11/intermittent-demand-don-t-try-to-predict-when-it-will-happen/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Why Naive is not a good benchmark for intermittent demand</title>
		<link>https://openforecast.org/2024/12/02/why-naive-is-not-a-good-benchmark-for-intermittent-demand/</link>
					<comments>https://openforecast.org/2024/12/02/why-naive-is-not-a-good-benchmark-for-intermittent-demand/#comments</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Mon, 02 Dec 2024 14:05:53 +0000</pubDate>
				<category><![CDATA[Forecast evaluation]]></category>
		<category><![CDATA[Intermittent demand]]></category>
		<category><![CDATA[Social media]]></category>
		<category><![CDATA[Theory of forecasting]]></category>
		<category><![CDATA[extrapolation methods]]></category>
		<category><![CDATA[intermittent demand]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=3739</guid>

					<description><![CDATA[<p>While Naive is considered a standard benchmark in forecasting, there is a case where it might not be a good one: intermittent demand. And here is why I think so. Naive is a forecasting method that uses the last available observation as a forecast for the next ones. It does not have any parameters to ... <a title="Why Naive is not a good benchmark for intermittent demand" class="read-more" href="https://openforecast.org/2024/12/02/why-naive-is-not-a-good-benchmark-for-intermittent-demand/" aria-label="Read more about Why Naive is not a good benchmark for intermittent demand">Read more</a></p>
<p>Message <a href="https://openforecast.org/2024/12/02/why-naive-is-not-a-good-benchmark-for-intermittent-demand/">Why Naive is not a good benchmark for intermittent demand</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>While Naive is considered a standard benchmark in forecasting, there is a case where it might not be a good one: intermittent demand. And here is why I think so.</p>
<p>Naive is a forecasting method that uses the last available observation as a forecast for the next ones. It does not have any parameters to estimate, it does not require training, it can be applied to the sample of any data (even if you only have one observation). When you deal with a regular demand, it makes perfect sense to use Naive as a benchmark, because it costs nothing in terms of computational time, you get a forecast of demand, and if you cannot beat it, you should rethink your forecasting process.</p>
<p>However, in case of intermittent demand, the demand itself does not happen on every observation. As a result, when the Naive copies the last available value, it can either reproduce either a proper non-zero demand, or just the absence of demand. The latter implies that nobody bought our product today, and nobody will do in the next week or whatever the forecasting horizon we use. In the following image, Naive will be the most accurate forecasting method, because in the training set, the final observation was zero, and in the test set we did not have any sales:</p>
<figure id="attachment_3741" aria-describedby="caption-attachment-3741" style="width: 290px" class="wp-caption aligncenter"><a href="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/12/2024-11-01-Naive-Intermittent-01.png&amp;nocache=1"><img fetchpriority="high" decoding="async" src="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/12/2024-11-01-Naive-Intermittent-01-300x180.png&amp;nocache=1" alt="Naive forecast on intermittent demand" width="300" height="180" class="size-medium wp-image-3741" srcset="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/12/2024-11-01-Naive-Intermittent-01-300x180.png&amp;nocache=1 300w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/12/2024-11-01-Naive-Intermittent-01-768x461.png&amp;nocache=1 768w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/12/2024-11-01-Naive-Intermittent-01.png&amp;nocache=1 1000w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-3741" class="wp-caption-text">Naive forecast on intermittent demand</figcaption></figure>
<p>But is this useful? To answer this question, we need to understand what specifically we are forecasting when we deal with demand with zeroes.</p>
<p>As discussed in a <a href="/2024/11/18/why-zeroes-happen/">previous post</a>, zeroes can occur for different reasons: some of them happen because nobody came to buy the product (naturally occurring zeroes), while the others appear because there was some sort of disruption (e.g. a stockout) or a product was discontinued (artificially occurring zeroes). The two situations are fundamentally different, but if we work with the sales data exclusively (no stock information), it can be hard to tell the difference between them. Naive might work perfectly in both cases, forecasting no sales for the next few observations, and it can be 100% right in some cases. But the problem is that this is not useful. If we indeed cannot beat Naive on the data with zeroes, it does not mean that we should use it, because there is a chance that we have stockouts in the holdout period. If that&#8217;s the case, we might be doing something fundamentally wrong. After all, &#8220;we will not sell anything&#8221; is in general a simple statement, but not ordering products based on that could be a mistake, because &#8220;no sales&#8221; is not the same as &#8220;no demand&#8221;. In fact, if Naive indeed performs very well on your series with zeroes, this might indicate that your evaluation is wrong and you need to clean the data, removing the discontinued and out of stock items from the evaluation.</p>
<p>There are three lessons here:</p>
<ol>
<li>we should forecast demand, not sales;</li>
<li>we should measure accuracy on the data with naturally occurring zeroes &#8211; do data cleaning before setting up your evaluation;</li>
<li>it&#8217;s better to use a benchmark that tries capturing demand, not the one that reproduces sales.</li>
</ol>
<p>Arguably, a more helpful benchmark forecast would be the one in the following image:</p>
<figure id="attachment_3742" aria-describedby="caption-attachment-3742" style="width: 290px" class="wp-caption aligncenter"><a href="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/12/2024-11-01-Naive-Intermittent-02.png&amp;nocache=1"><img decoding="async" src="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/12/2024-11-01-Naive-Intermittent-02-300x180.png&amp;nocache=1" alt="Forecast for intermittent demand from the SMA" width="300" height="180" class="size-medium wp-image-3742" srcset="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/12/2024-11-01-Naive-Intermittent-02-300x180.png&amp;nocache=1 300w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/12/2024-11-01-Naive-Intermittent-02-768x461.png&amp;nocache=1 768w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/12/2024-11-01-Naive-Intermittent-02.png&amp;nocache=1 1000w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-3742" class="wp-caption-text">Forecast for intermittent demand from the SMA</figcaption></figure>
<p>The forecast above was generated using the <a href="/2024/10/28/why-is-it-hard-to-beat-simple-moving-average/">Simple Moving Average</a>, and it tells us that there is a demand for the product over the next 13 days. Yes, it is less accurate than Naive, but it gives an estimate of the expected demand, not the expected sales.</p>
<p>Message <a href="https://openforecast.org/2024/12/02/why-naive-is-not-a-good-benchmark-for-intermittent-demand/">Why Naive is not a good benchmark for intermittent demand</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2024/12/02/why-naive-is-not-a-good-benchmark-for-intermittent-demand/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Why zeroes happen</title>
		<link>https://openforecast.org/2024/11/18/why-zeroes-happen/</link>
					<comments>https://openforecast.org/2024/11/18/why-zeroes-happen/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Mon, 18 Nov 2024 11:12:15 +0000</pubDate>
				<category><![CDATA[Intermittent demand]]></category>
		<category><![CDATA[Social media]]></category>
		<category><![CDATA[Theory of forecasting]]></category>
		<category><![CDATA[intermittent demand]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=3734</guid>

					<description><![CDATA[<p>Anna Sroginis and I have been working on a new approach for intermittent demand classification over the past year. We&#8217;ve taken a fresh look at the problem, starting by asking: why do zeroes happen? Let&#8217;s discuss why indeed. First, a quick note: it&#8217;s a mistake to define intermittent demand simply as &#8220;demand with zeroes&#8221;. That ... <a title="Why zeroes happen" class="read-more" href="https://openforecast.org/2024/11/18/why-zeroes-happen/" aria-label="Read more about Why zeroes happen">Read more</a></p>
<p>Message <a href="https://openforecast.org/2024/11/18/why-zeroes-happen/">Why zeroes happen</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Anna Sroginis and I have been working on a new approach for intermittent demand classification over the past year. We&#8217;ve taken a fresh look at the problem, starting by asking: why do zeroes happen? Let&#8217;s discuss why indeed.</p>
<p>First, a quick note: it&#8217;s a mistake to define intermittent demand simply as &#8220;demand with zeroes&#8221;. That definition is incomplete and can be misleading. As some of you know, the definition I prefer is that <a href="/2024/06/18/introduction-to-intermittent-demand/">intermittent demand occurs at irregular frequencies</a>. This means the zeroes in such demand are unpredictable and happen simply because nobody wanted to buy the product on a specific day. Unless you know precisely who will buy and how much, you can’t predict if there will be demand that day. These zeroes can be considered &#8220;naturally occurring&#8221;.</p>
<p>But zeroes can also happen for other reasons. People might want to buy a product, but it may be unavailable. This typically happens due to stockouts, caused by either incorrect safety stock levels, supply chain disruptions (e.g., a container ship running aground), or a product being discontinued by the company. Sometimes, zero sales occur because a store was closed for a holiday, a gas leak, a flood, or another unexpected event. These types of zeroes are explainable and sometimes even predictable, so we can call them &#8220;artificially occurring&#8221;.</p>
<p>Furthermore, zeroes may appear at the start of a time series if a product was recently introduced and lacks a sales history. These zeroes don’t provide useful information for forecasting.</p>
<p>Some zeroes might also occur seasonally, for example, for Christmas-related products. These too can be classified as artificially occurring because, while there may be a small demand for such items, it’s usually unreasonable to sell them just to satisfy a handful of customers.</p>
<p>Finally, errors in the system can result in zeroes. For example, sales might not have been recorded correctly, leading to either zeroes or missing values (sometimes treated as zeroes). These can also be categorized as &#8220;artificially occurring&#8221;.</p>
<p>Demand with only artificially occurring zeroes isn’t intermittent; it is regular demand with issues.</p>
<p>Having said that, the reality is often more complex. You can easily have intermittent demand with stockouts, and distinguishing between naturally and artificially occurring zeroes in such cases can be challenging.</p>
<p>But why bother?</p>
<p>If your goal is to forecast demand (not just sales), you need to address artificially occurring zeroes in your data. When applying models, you should indicate which observations should either be ignored or treated differently. Similarly, when measuring the performance of your models (e.g., forecasting accuracy), you should evaluate them on data without artificially occurring zeroes. Otherwise, you’ll end up testing which model forecasts stockouts or system failures better, rather than actual demand. This ties into the well-known principle: &#8220;You should forecast demand, not sales&#8221;. In the case of intermittent demand, this is not only difficult but also extremely important.</p>
<p>Here’s an example of a time series N27364 from the M5 competition (<a href="https://doi.org/10.1016/j.ijforecast.2021.11.013", target="blank">Makridakis et al., 2022</a>):</p>
<figure id="attachment_3735" aria-describedby="caption-attachment-3735" style="width: 290px" class="wp-caption aligncenter"><a href="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/11/2021115-Zeroes-Example-N27364.png&amp;nocache=1"><img decoding="async" src="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/11/2021115-Zeroes-Example-N27364-300x175.png&amp;nocache=1" alt="Series N27364 from the M5 dataset" width="300" height="175" class="size-medium wp-image-3735" srcset="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/11/2021115-Zeroes-Example-N27364-300x175.png&amp;nocache=1 300w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/11/2021115-Zeroes-Example-N27364-1024x597.png&amp;nocache=1 1024w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/11/2021115-Zeroes-Example-N27364-768x448.png&amp;nocache=1 768w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/11/2021115-Zeroes-Example-N27364.png&amp;nocache=1 1200w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-3735" class="wp-caption-text">Series N27364 from the M5 dataset</figcaption></figure>
<p>This isn’t a unique case, most time series in the M5 dataset have stockouts. In this specific example, gaps in sales are apparent and likely caused artificially. If we train a model on this data, it might those zeroes into account and produce inaccurate demand forecasts, e.g. lower point forecasts than necessary. The problem worsens if the test set also contains stockouts, as the selected model would be the one that forecasts artificially occurring zeroes better. Using such a model in decision-making could be harmful, leading to erroneous decisions like discontinuing products that actually sell well.</p>
<p>As a final note, Stephan Kolassa has given excellent presentations on the challenges of forecasting in retail. He has shared insightful examples of the complexities of tracking sales and stock. For instance, he discussed this topic in <a href="https://www.youtube.com/watch?v=sUlToPvftFw">one of the CMAF webinars</a> and in <a href="https://www.youtube.com/watch?v=1ZdUlP2isyM">this short video</a>.</p>
<p>Message <a href="https://openforecast.org/2024/11/18/why-zeroes-happen/">Why zeroes happen</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2024/11/18/why-zeroes-happen/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Intermittent demand classifications: is that what you need?</title>
		<link>https://openforecast.org/2024/07/16/intermittent-demand-classifications-is-that-what-you-need/</link>
					<comments>https://openforecast.org/2024/07/16/intermittent-demand-classifications-is-that-what-you-need/#comments</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Tue, 16 Jul 2024 10:58:19 +0000</pubDate>
				<category><![CDATA[Intermittent demand]]></category>
		<category><![CDATA[Social media]]></category>
		<category><![CDATA[Theory of forecasting]]></category>
		<category><![CDATA[intermittent demand]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=3618</guid>

					<description><![CDATA[<p>When you start working with your data and suddenly realise that there are zeroes there, i.e. it is intermittent demand, what should you do first? Some people use SBC classification, but is that what you need? Let&#8217;s discuss! Intermittent demand comes in different flavours: sometimes zeroes occur frequently with low demand volumes, while other times ... <a title="Intermittent demand classifications: is that what you need?" class="read-more" href="https://openforecast.org/2024/07/16/intermittent-demand-classifications-is-that-what-you-need/" aria-label="Read more about Intermittent demand classifications: is that what you need?">Read more</a></p>
<p>Message <a href="https://openforecast.org/2024/07/16/intermittent-demand-classifications-is-that-what-you-need/">Intermittent demand classifications: is that what you need?</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>When you start working with your data and suddenly realise that there are zeroes there, i.e. it is intermittent demand, what should you do first? Some people use SBC classification, but is that what you need? Let&#8217;s discuss!</p>
<p>Intermittent demand comes in different flavours: sometimes zeroes occur frequently with low demand volumes, while other times the volumes are high with occasional zeroes. Demand patterns can also change over time, with demand either becoming obsolete (more zeroes) or building up (fewer zeroes). How can we classify these different types of demand? Well, there is a paper on that (academic Rule 34)!</p>
<p><a href="https://doi.org/10.1057/palgrave.jors.2601841">Syntetos, Boylan &#038; Croston (2005)</a> developed a categorization scheme using the Average Demand Interval (ADI) and Coefficient of Variation (CV). They compared MSE performance of <a href="https://doi.org/10.2307/3007885">Croston (1972)</a> and SBA (<a href="https://doi.org/10.1016/j.ijforecast.2004.10.001">Syntetos &#038; Boylan, 2005</a>) forecasting methods, creating four categories of intermittent demand with ADI=1.32 and CV²=0.49 as cut-off values:</p>
<p>1. Erratic but not very intermittent<br />
2. Smooth<br />
3. Lumpy<br />
4. Intermittent but not very erratic</p>
<p>These are distinct categories of INTERMITTENT demand, though the names of the first and last are sometimes shortened to &#8220;Erratic&#8221; and &#8220;Intermittent,&#8221; causing confusion (intermittent demand can be intermittent?). The authors recommended using Croston for (1) and SBA for the other three. The image below illustrates these categories, with ADI increasing from left to right and CV increasing from bottom to top.</p>
<figure id="attachment_3606" aria-describedby="caption-attachment-3606" style="width: 290px" class="wp-caption aligncenter"><a href="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-07-Intermittent-demand-classification.png&amp;nocache=1"><img loading="lazy" decoding="async" src="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-07-Intermittent-demand-classification-300x175.png&amp;nocache=1" alt="Examples of intermittent demand data" width="300" height="175" class="size-medium wp-image-3606" srcset="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-07-Intermittent-demand-classification-300x175.png&amp;nocache=1 300w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-07-Intermittent-demand-classification-1024x597.png&amp;nocache=1 1024w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-07-Intermittent-demand-classification-768x448.png&amp;nocache=1 768w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-07-Intermittent-demand-classification.png&amp;nocache=1 1200w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-3606" class="wp-caption-text">Examples of intermittent demand data</figcaption></figure>
<p>But that&#8217;s not all! <a href="https://doi.org/10.1057/palgrave.jors.2602211">Kostenko &#038; Hyndman (2006)</a> found that the split between Croston and SBA does not form four distinct areas &#8211; the cut-off should be non-linear. While mathematically correct, this classification has not gained as much popularity as SBC because it is more complicated. There is also a <a href="https://doi.org/10.1057/palgrave.jors.2602182">reply from Syntetos, Boylan &#038; Croston to Kostenko &#038; Hyndman</a>, where the authors of the original classification agree with the new cut-off but also point out that their classification is practical, while not necessarily as accurate as KH.</p>
<p>Furthermore, <a href="https://doi.org/10.1057/jors.2014.62">Petropoulos &#038; Kourentzes (2015)</a> extended the KH classification by adding Simple Exponential Smoothing for regular demand, where the average inter-demand interval equals to one. </p>
<p>So, we have at least 3 popular techniques. So what?</p>
<p>These classifications were designed for conventional intermittent demand (e.g., spare parts) assuming stable ADI and CV over time. But what if demand builds up (fewer zeroes, higher volume) or slows down? In such cases, SBC, KH, and PK would be inappropriate. Moreover, classification should serve a purpose. SBC&#8217;s original purpose was to help choosing between Croston and SBA. So, the threshold between &#8220;lumpy&#8221; and &#8220;erratic&#8221; is based on these methods&#8217; MSE performance. Are you using these methods in your case? If not, why bother with SBC/KH/PK classifications?</p>
<p>In the 2024, we have more advanced models and methods, and, for example, using SBC to decide between XGBoost and Poisson regression would be unwise. You need a different classification! Or maybe you don&#8217;t need one at all, just apply competing approaches and select the most appropriate one based on the holdout performance.</p>
<p>So, next time you work with intermittent demand, stop for a second and think what you plan to do. SBC is useful, but don&#8217;t use it just because you don&#8217;t know what to do!</p>
<p>Message <a href="https://openforecast.org/2024/07/16/intermittent-demand-classifications-is-that-what-you-need/">Intermittent demand classifications: is that what you need?</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2024/07/16/intermittent-demand-classifications-is-that-what-you-need/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Introduction to intermittent demand</title>
		<link>https://openforecast.org/2024/06/18/introduction-to-intermittent-demand/</link>
					<comments>https://openforecast.org/2024/06/18/introduction-to-intermittent-demand/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Tue, 18 Jun 2024 16:09:31 +0000</pubDate>
				<category><![CDATA[Intermittent demand]]></category>
		<category><![CDATA[Social media]]></category>
		<category><![CDATA[Theory of forecasting]]></category>
		<category><![CDATA[intermittent demand]]></category>
		<category><![CDATA[theory]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=3602</guid>

					<description><![CDATA[<p>Sometimes, when you need to forecast demand, you may notice that the recorded data contains zeroes. There are several possible reasons for this, but today we&#8217;ll briefly discuss one of them. Welcome to the world of &#8220;intermittent demand&#8221;! Intermittent demand is the demand that happens at irregular frequency (Svetunkov &#038; Boylan, 2023). This means you ... <a title="Introduction to intermittent demand" class="read-more" href="https://openforecast.org/2024/06/18/introduction-to-intermittent-demand/" aria-label="Read more about Introduction to intermittent demand">Read more</a></p>
<p>Message <a href="https://openforecast.org/2024/06/18/introduction-to-intermittent-demand/">Introduction to intermittent demand</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Sometimes, when you need to forecast demand, you may notice that the recorded data contains zeroes. There are several possible reasons for this, but today we&#8217;ll briefly discuss one of them. Welcome to the world of &#8220;intermittent demand&#8221;!</p>
<p>Intermittent demand is the demand that happens at irregular frequency (<a href="/2023/09/08/iets-state-space-model-for-intermittent-demand-forecasting/">Svetunkov &#038; Boylan, 2023</a>). This means you cannot predict when demand occurs: you might have some sales of a lipstick on Monday but then nothing on Tuesday, and there is no pattern in purchases. This additional element of randomness, not only about <strong>how much</strong> but also <strong>when</strong> people buy, creates additional challenges. Intermittent demand can be split into two parts: demand sizes (how much is needed) and demand occurrence (when it is needed) or demand intervals (the time between purchases).</p>
<p>If your demand has zeroes for some specific reasons, such as certain times of day, it may be non-intermittent. Zeroes can also result from shortages or recording errors, which should be treated differently. In those cases, the demand itself maybe non-zero, but sales would be zero due to technical reasons. This means that not every series that has zeroes should be considered and treated as intermittent.</p>
<p>An important thing to note is that intermittent demand is not the same as count demand, but it is a wider term. Zero value in case of count data is just a possible outcome, e.g. nobody came to the hospital at this hour because there was no demand, and thus we recorded a zero value. In fact, it is possible for count demand not to have any zeroes at all, while for the intermittent it is a requirement. Furthermore, zero has a slightly different meaning in the intermittent demand: there might be a potential non-zero demand for paracetamol at our shop at this hour, but we just did not observe it because a customer didn&#8217;t make it to the shop. The difference between the two situations is intricate, but fundamental. However it is worth noting that intermittent demand can be either count or non-count. For example, demand for jet engines is count, while demand for EV charging is non-count.</p>
<p>The fundamental difference between count demand and intermittent demand lies in their treatment. In intermittent demand, you may need separate models for demand occurrence and demand sizes. In count demand, using an appropriate count distribution model (e.g., Poisson or Negative Binomial) or an ML method is sufficient. The split into demand sizes and demand occurrence (or demand intervals) gives additional flexibility and allows capturing more complex patterns in the data. For example, the frequency of purchase might increase if the product becomes more popular, implying that the probability of sale goes up, but the demand sizes might stay on a similar level. Another situation would be when product becomes obsolete, where both demand sizes and demand occurrence decline over time. Finally, there is also a possibility of demand having the same level of occurrence, not changing substantially over time (e.g. sales of large machines). All of these cases can be captured using models that split demand into two aforementioned parts.</p>
<p>The following image provides several examples of intermittent demand, which we will discuss in future posts:</p>
<figure id="attachment_3606-2" aria-describedby="caption-attachment-3606-2" style="width: 290px" class="wp-caption aligncenter"><a href="/wp-content/uploads/2024/06/2024-06-07-Intermittent-demand-classification.png"><img loading="lazy" decoding="async" src="/wp-content/uploads/2024/06/2024-06-07-Intermittent-demand-classification-300x175.png" alt="Examples of intermittent demand data" width="300" height="175" class="size-medium wp-image-3606" srcset="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-07-Intermittent-demand-classification-300x175.png&amp;nocache=1 300w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-07-Intermittent-demand-classification-1024x597.png&amp;nocache=1 1024w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-07-Intermittent-demand-classification-768x448.png&amp;nocache=1 768w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-07-Intermittent-demand-classification.png&amp;nocache=1 1200w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-3606-2" class="wp-caption-text">Examples of intermittent demand data</figcaption></figure>
<p>Finally, intermittent demand can appear at higher recording frequencies. For instance, while daily demand may seem regular, hourly data may reveal zeroes. This increases forecasting complexity, so when selecting an aggregation level, we should consider whether the added complexity aligns with the decision-making based on the forecasts.</p>
<p>Additional resources to read: <a href="/2020/01/13/what-about-all-those-zeroes-measuring-performance-of-models-on-intermittent-demand/">a post about measuring accuracy of intermittent demand</a>, <a href="https://www.wiley.com/en-us/Intermittent+Demand+Forecasting%3A+Context%2C+Methods+and+Applications-p-9781119976080">a monograph on intermittent demand forecasting by Boylan &#038; Syntetos</a>.</p>
<p>Message <a href="https://openforecast.org/2024/06/18/introduction-to-intermittent-demand/">Introduction to intermittent demand</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2024/06/18/introduction-to-intermittent-demand/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What about all those zeroes? Measuring performance of models on intermittent demand</title>
		<link>https://openforecast.org/2020/01/13/what-about-all-those-zeroes-measuring-performance-of-models-on-intermittent-demand/</link>
					<comments>https://openforecast.org/2020/01/13/what-about-all-those-zeroes-measuring-performance-of-models-on-intermittent-demand/#comments</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Mon, 13 Jan 2020 20:06:34 +0000</pubDate>
				<category><![CDATA[Forecast evaluation]]></category>
		<category><![CDATA[Intermittent demand]]></category>
		<category><![CDATA[Theory of forecasting]]></category>
		<category><![CDATA[error measures]]></category>
		<category><![CDATA[intermittent demand]]></category>
		<category><![CDATA[theory]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=2278</guid>

					<description><![CDATA[<p>UPDATE: Read more about intermittent demand in newer posts: Introduction to intermittent demand Do you really need SBC? Lumpy is a type of intermittent demand and the usefulness of the classification scheme; And there is more, check the Intermittent Demand category on the website. In one of the previous posts, we have discussed how to ... <a title="What about all those zeroes? Measuring performance of models on intermittent demand" class="read-more" href="https://openforecast.org/2020/01/13/what-about-all-those-zeroes-measuring-performance-of-models-on-intermittent-demand/" aria-label="Read more about What about all those zeroes? Measuring performance of models on intermittent demand">Read more</a></p>
<p>Message <a href="https://openforecast.org/2020/01/13/what-about-all-those-zeroes-measuring-performance-of-models-on-intermittent-demand/">What about all those zeroes? Measuring performance of models on intermittent demand</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>UPDATE: Read more about intermittent demand in newer posts:</p>
<ul>
<li><a href="/2024/06/18/introduction-to-intermittent-demand/">Introduction to intermittent demand</a></li>
<li><a href="/2024/07/16/intermittent-demand-classifications-is-that-what-you-need/">Do you really need SBC?</a></li>
<li><a href="/2025/06/04/sbc-is-not-for-you/">Lumpy is a type of intermittent demand and the usefulness of the classification scheme</a>;</li>
</ul>
<p>And there is more, check the <a href="/category/forecasting-theory/intermittent-demand/">Intermittent Demand category</a> on the website.</p>
<hr>
<p>In <a href="/en/2019/08/25/are-you-sure-youre-precise-measuring-accuracy-of-point-forecasts/">one of the previous posts</a>, we have discussed how to measure the accuracy of forecasting methods on the continuous data. All these MAE, RMSE, MASE, RMSSE, rMAE, rRMSE and other measures can give you an information about the mean or median performance of forecasting methods. We have also discussed how to measure the performance of models in terms of <a href="/en/2019/10/18/how-confident-are-you-assessing-the-uncertainty-in-forecasting/">prediction intervals</a>, and should now be comfortable with such measures as Range, Coverage, pinball, MIS. But all of this might become irrelevant when we face the intermittent demand – it can really make a bright day dark and screw with you and your measures. So, care is needed if you have data with randomly occurring zeroes.</p>
<p>We have already discussed aspects of intermittent demand in a post about <a href="/en/2018/09/18/smooth-package-for-r-intermittent-state-space-model-part-i-introducing-the-model/">the intermittent exponential smoothing model</a> some time ago, and we have seen some time series examples in <a href="/en/2019/08/25/are-you-sure-youre-precise-measuring-accuracy-of-point-forecasts/">one of the previous posts</a>, so I will not repeat myself, but I still think that there are a couple of important notes worth making about it.</p>
<p>Intermittent time series is the series that has non-zero values occurring at irregular intervals. This implies that there might be some periods of time, when we observe zeroes (e.g. no one buys our product). An example of such time series is shown below:</p>
<figure id="attachment_2279" aria-describedby="caption-attachment-2279" style="width: 290px" class="wp-caption aligncenter"><a href="/wp-content/uploads/2020/01/MAE-MSE-IntermittentExample.png"><img loading="lazy" decoding="async" src="/wp-content/uploads/2020/01/MAE-MSE-IntermittentExample-300x175.png" alt="Intermittent Demand" width="300" height="175" class="size-medium wp-image-2279" srcset="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2020/01/MAE-MSE-IntermittentExample-300x175.png&amp;nocache=1 300w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2020/01/MAE-MSE-IntermittentExample-1024x597.png&amp;nocache=1 1024w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2020/01/MAE-MSE-IntermittentExample-768x448.png&amp;nocache=1 768w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2020/01/MAE-MSE-IntermittentExample.png&amp;nocache=1 1200w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-2279" class="wp-caption-text">Intermittent Demand</figcaption></figure>
<p>As you can see, there are two sources of randomness in this data: there is a randomness about the non-zero value itself (e.g. demand size) and there is also a randomness about the occurrence of the non-zero value (e.g. demand occurrence). So, a very general model for intermittent demand can be represented as:<br />
\begin{equation} \label{eq:general}<br />
	y_t = o_t z_t ,<br />
\end{equation}<br />
where \(y_t\) is the observed value at time \(t\), \(o_t\) is the binary occurrence variable and \(z_t\) is the demand sizes variable. While there are some statistical models that don’t do this distinction, the intermittent demand forecasting methods that are most popular in practice do it either directly or indirectly.</p>
<p>Although we can create very fancy forecasting models (there are even tries to <a href="https://doi.org/10.1016/j.ijpe.2013.01.009">use neural networks for this</a>), we usually cannot accurately predict, when specifically the product will be bought and how many units we will sell. All we usually can do is to produce the mean value and / or prediction intervals for the demand itself. And even if we do that, the next thing to ask ourselves is: “What do we do with that?”</p>
<p><strong>In a supply chain context</strong>, the typical decision would be <em>how many units of product to order or to produce</em>, given the amount that we already have. In this case we are usually talking about <em>the safety stock</em> – how many units of the product we should hold, so that we satisfy the demand and don’t have empty shelves. Typically, this is determined based on calculation of <em>quantiles of a distribution</em>. In many cases, in practice, the Normal distribution is used, and I cannot describe on how many levels this is wrong (the most obvious thing to point out is that usually we cannot have negative amounts of product). But let’s not get too much distracted.</p>
<p>What does the safety stock typically depend on? In many cases this is not just the demand of a product, but specifically <em>the demand over the lead time</em> – for example, how many products we will sell over the next week. Why? Because the deliveries tend to happen once over a time period, e.g. once a week, and we tend to order products once in a period of time &#8211; it does not make sense to order the product each time we run out of it. So, we do periodic reviews of the inventory and decide, how much we should order, so that we don&#8217;t run out of stock until the next replenishment.</p>
<p>Good. So, how do we get the information about the demand over the lead time? Here comes our <em>forecasting model</em>! But all of this implies that we should focus not just on the point and interval forecasts for each specific horizon, but on the values aggregated over the lead time. This is the first important difference between conventional forecasting and forecasting for inventory purposes (see for example, <a href="https://doi.org/10.1016/j.ijpe.2019.107597" rel="noopener noreferrer" target="_blank">Kourentzes et al., 2019</a>).</p>
<p>As you can see, the relation between the actual demand forecast and the decision of how much to order is complex. And this means that all those nice error measures, discussed in the previous posts, might not give us the important information of how our model performs in terms of orders. The model can produce very accurate forecasts, but this does not necessarily translate directly to correct ordering policy.</p>
<p>In order to align the model with the specific decisions, one can revert to simulations, so that it becomes more apparent how the model performs in terms of achieved service level, lost sales and excess inventory (which all are sort of proxies to the object of real interest in practice &#8211; the cost). This is one of the common approaches in the modern supply chain and inventory literature. Unfortunately, this approach is computationally expensive and may vary from one situation to another, so you would need to set up the simulation for each separate company and potentially for different products.</p>
<p>An alternative approach would be to at least asses the performance of models over the lead time, not on each observation. This means that we need to refer to cumulative values over the period of time:<br />
\begin{equation} \label{eq:demandOverTheLeadTime}<br />
	Y_{t+h} = \sum_{j=1}^h {y}_{t+j} .<br />
\end{equation}<br />
Then we can measure, for example, how our models perform in terms of working stock (aka “cycle stock”). In this case we are only interested in the mean demand over the lead time, which for the additive models is relatively easy to deal with because the expectation of the sum of the demands is equal to the sum of the expectations:<br />
\begin{equation}<br />
\begin{aligned}<br />
	\text{E} \left(\sum_{j=1}^h {y}_{t+j} \right) = &#038; \text{E}\left(\sum_{j=1}^h (\hat{y}_{t+j}+e_{t+j})\right) =\\<br />
	&#038;\sum_{j=1}^h \text{E}(\hat{y}_{t+j}) + \sum_{j=1}^h \text{E}(e_{t+j}) = \sum_{j=1}^h \text{E}(\hat{y}_{t+j}).<br />
\end{aligned} \label{eq:workingStock}<br />
\end{equation}<br />
where \(\hat{y}_{t+j}\) is the point forecast of a model. This means that we can produce the \(h\) steps ahead forecast and aggregate it over the lead time \(h\) and then compare it with the actual values for the same period. However, if we deal with the additive models in this context, then we are assuming that the demand can be negative – which is usually unrealistic, especially for intermittent demand. This means that a different model is needed, and \eqref{eq:workingStock} might not hold any more. So, for example, in case of ETS(M,N,N) simulations are necessary in order to produce the correct cumulative conditional expectation over the lead time.</p>
<p>Now, let’s say that we have managed to produce meaningful cumulative point forecast. What’s the next step? We need to measure its accuracy. The good news is, RMSE-based measures can be used in order to assess the performance of models in terms of the working stock (I hope you still remember, why <a href="/en/2019/08/25/are-you-sure-youre-precise-measuring-accuracy-of-point-forecasts/">MAE- and MAPE-based measures are not appropriate for intermittent demand</a>). So, we can evaluate the Squared Cumulative Error and compare models based on it:<br />
\begin{equation} \label{eq:workingStockRMSCE}<br />
	\text{SCE} = \left( \sum_{j=1}^h y_{t+j} -\sum_{j=1}^h \hat{y}_{t+j} \right)^2 .<br />
\end{equation}<br />
We can use relative or scaled measures, if we want to compare performance of models across products – all the things discussed in <a href="/en/2019/08/25/are-you-sure-youre-precise-measuring-accuracy-of-point-forecasts/">the previous post</a> are applicable here. The main limitation here is that, given that we deal with intermittent demand, Naive method might cause problems if used as a benchmark. An example is a situation, when it produces zero forecasts for the holdout sample (because the last observation was zero), and the holdout contains only zeroes. This might happen by chance, but it will mess your beautiful relative error measures. A simple average of the whole series might be more appropriate as a benchmark for the intermittent demand.</p>
<p>There is a measure, which is ideologically close to the SCE. It is called &#8220;Periods-In-Stock&#8221; &#8211; PIS (<a href="https://doi.org/10.1016/j.ijpe.2010.07.013">Walstrom, 2010</a>):<br />
\begin{equation} \label{eq:workingStockPIS}<br />
	\text{PIS} = \sum_{j=1}^h \hat{y}_{t+j} -\sum_{j=1}^h y_{t+j} .<br />
\end{equation}<br />
Have you noticed that it is calculated as forecast minus the actual values? This was done by the author intentionally, so that the sign of the measure aligns with the inventory decisions. If the value is negative, then this means that we missed sales. If it is positive, then this means that we had too much stock and did not sell as much as we should have. <a href="https://doi.org/10.1057/jors.2014.62" rel="noopener noreferrer" target="_blank">Petropoulos &#038; Kourentzes (2015)</a> have proposed several modifications of PIS, which allow aggregating this measure over several products. So, have a look at the paper if you are interested, but I will not expand here.</p>
<p>By looking at those error measures, we can evaluate the performance in terms of working stock. But, as it was mentioned before, this does not necessarily translate to safety stock performance. So we need to figure out how to align our error measures with it. It seems that the closest we can get to it is by producing the specific quantiles for the values accumulated over the lead time. We typically don’t care about the lower bound, because in case of intermittent demand it is usually just zero, plus, the lower bound is not helpful for inventory decisions (e.g., knowing what will be the level of sales in 2.5% of cases is not helpful). So, we are more interested in the upper bound. In a realistic situation we would need to simulate the data from our model (something like a 1000 runs for the possible future outcomes), sum it up over the lead time and then take the upper quantile (for example, 95% or 99%). We have to do it this way, because we might not have expressions for the quantiles for the values accumulated over the lead time. But this way we will get quite close to the safety stock.</p>
<p>How do we measure performance of models in terms of this upper bound? I would be inclined to recommend pinball function, keeping in mind its limitations, discussed in <a href="/en/2019/10/18/how-confident-are-you-assessing-the-uncertainty-in-forecasting/">the previous post</a>. We can also analyse the coverage and range, and if we really need to use something like Mean Interval Score (MIS), then it makes sense to use Quantile Score instead (<a href="https://doi.org/10.1198/016214506000001437" rel="noopener noreferrer" target="_blank">Gneiting, 2007</a>), because it only takes the upper bound into account. However it needs to be modified in order to reflect the idea of cumulative values:<br />
\begin{equation} \label{QS}<br />
	\text{QS} = \left(Y_{t+h} &#8211; U_{t+h} \right) \left(\mathbb{1} \left\{ Y_{t+h} \leq U_{t+h} \right\} -\alpha \right) ,<br />
\end{equation}<br />
where \(\alpha\) is the confidence level (in our example 95% or 99%), \(U_{t+h}\) is the value of the quantile and \(\mathbb{1}(\cdot)\) is the indicator function, returning one, when the condition is true and zero otherwise. The QS has similar interpretation and working principle as MIS: if the values lie below the specified quantile, then the measure is penalised less than in the case, when they lie above: in the former case the indicator function returns 1, so the weight becomes \(1-0.95=0.05\), while in the latter case it is equal to zero, so the weight is \(0 -0.05 = -0.05\). Note also that in that latter case the difference between the actual value and the bound is negative. This means that QS will always be positive, and in the ideal situation, when all the future values lie on the bound, the QS is equal to zero. The difference between QS and pinball function is in what specifically they measure. The QS measures the performance in terms of coverage and range for the bound, while the pinball tries to measure, how accurately we hit the specific quantile. So, arguably, QS is closer to what we would be interested in real life: we want to have the coverage closer to nominal (so that we achieve the nominal service level), but with the smallest range possible (so that we do not order too much and do not have huge holding costs). Based on QS, we can calculate scaled or relative measures in order to compare performance of forecasting models across the products.</p>
<p>So, what about <strong>the other intermittent demand contexts</strong>? In some of them the situation might be quite different and in some sense easier than in supply chain. For example, in case of the forecasting the patients flow in a hospital, we often do not need to deal with values over the lead time, which simplifies things substantially. In addition, we might not care much about the average number of patients for a specific day, but be more interested in the prediction interval. This way we can assess how many patients to expect in the &#8220;worst&#8221; / &#8220;best&#8221; case scenarios for the selected confidence level. Based on these values, we then decide, how many nurses, doctors and beds we should have for a specific day in order to service, let’s say, 95% of the patients in the next 4 hours. Note that yet again the prediction interval is not directly related to this goal, but at least it can be considered as an approximation to it, if we know how many nurse and doctor hours we typically need in order to process a specific type of patient. This also implies that we should evaluate the accuracy of the prediction intervals, not the accuracy of the mean. And, when doing all of that in case of intermittent demand, once again, we usually don’t care about the lower bound, because we can typically say even without any model that in the worst (best?) case we won’t have any patients at all. Instead, we should concentrate on the upper bound of the prediction interval, and we can use the measures, discussed in the previous context in this post.</p>
<p>Having said all this, the general recommendation for dealing with intermittent demand – avoid it at all costs. Why? Because intermittent demand is messy to identify and to deal with. Besides, are you sure that you really need to produce forecasts on that level of sales? What specific decisions do you make based on those forecasts? Maybe you don’t need to know how many watermellons you will sell in each separate shop every day. Maybe you should switch to weekly data, where the intermittency disappears, or aggregate sales of products over larger volumes and over several shops in the chain&#8230; So, before diving into the problem and trying to evaluate models, <strong>think about the decisions you usually make based on those models</strong>.</p>
<p>Message <a href="https://openforecast.org/2020/01/13/what-about-all-those-zeroes-measuring-performance-of-models-on-intermittent-demand/">What about all those zeroes? Measuring performance of models on intermittent demand</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2020/01/13/what-about-all-those-zeroes-measuring-performance-of-models-on-intermittent-demand/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
