{"id":511,"date":"2014-07-17T16:02:25","date_gmt":"2014-07-17T16:02:25","guid":{"rendered":"http:\/\/kourentzes.com\/forecasting\/?p=511"},"modified":"2014-12-18T10:39:51","modified_gmt":"2014-12-18T10:39:51","slug":"mapa-and-intermittent-demand-forecasting","status":"publish","type":"post","link":"https:\/\/kourentzes.com\/forecasting\/2014\/07\/17\/mapa-and-intermittent-demand-forecasting\/","title":{"rendered":"MAPA and intermittent demand forecasting"},"content":{"rendered":"<p style=\"text-align: justify;\">Recently I posted about a paper I co-authored with Fotios Petropoulos, now in JORS: <a title=\"Forecast Combinations for Intermittent Demand\" href=\"http:\/\/kourentzes.com\/forecasting\/2014\/05\/13\/forecast-combinations-for-intermittent-demand\/\">Forecast Combinations for Intermittent Demand<\/a>. There we found that for intermittent demand data using multiple levels of temporal aggregation, forecasting them with the appropriate models and finally combining the forecasts performed best.<\/p>\n<p style=\"text-align: justify;\">This approach has many analogies with the <a title=\"Improving forecasting by estimating time series structural components across multiple frequencies\" href=\"http:\/\/kourentzes.com\/forecasting\/2014\/04\/19\/improving-forecasting-by-estimating-time-series-structural-components-across-multiple-frequencies\/\">MAPA algorithm<\/a> for non-intermittent time series. However, one difference between the original MAPA and its intermittent demand equivalent (let&#8217;s name it iMAPA for now) is that the former is fully automatic, while the latter was investigated with a-priori selected parameters for the intermittent demand methods (Croston and SBA). Therefore, although iMAPA outperformed the benchmarks, it was not fully automatic.<\/p>\n<p style=\"text-align: justify;\">Recently, I published a <a title=\"On Intermittent Demand Model Optimisation and Selection\" href=\"http:\/\/kourentzes.com\/forecasting\/2014\/06\/11\/on-intermittent-demand-model-optimisation-and-selection\/\">paper<\/a> on how to automatically select parameters for Croston&#8217;s method and its variants and put everything together in an <a title=\"Intermittent demand forecasting package for R\" href=\"http:\/\/kourentzes.com\/forecasting\/2014\/06\/23\/intermittent-demand-forecasting-package-for-r\/\">R package<\/a> to make it easily accessible to other researchers and practitioners. The apparent next step was to explore how automatic parameter specification worked with iMAPA and investigate whether this provided further improvements, as it was the case for Croston, SBA and TSB. In addition, following the original MAPA, I investigate the impact of the combination operator.<\/p>\n<p style=\"text-align: justify;\">Using the same experimental setup as in the JORS paper the new results are as follows:<\/p>\n<p style=\"text-align: justify;\"><div class=\"table-responsive\"><table  style=\"width:100%; \"  class=\"easy-table easy-table-default \" >\n<caption>Scaled Mean Absolute Error<\/caption>\n<thead>\r\n<tr><th  style=\"text-align:left\" ><\/th>\n<th  style=\"text-align:left\" >Method<\/th>\n<th  style=\"text-align:center\" >Parameter<\/th>\n<th  style=\"text-align:center\" >sMAE<\/th>\n<\/tr>\n<\/thead>\n<tbody>\r\n<tr><td  style=\"text-align:left\" ><\/td>\n<td  style=\"text-align:left\" >Croston<\/td>\n<td  style=\"text-align:center\" >0.10<\/td>\n<td  style=\"text-align:center\" >1.770<\/td>\n<\/tr>\n\r\n<tr><td  style=\"text-align:left\" ><\/td>\n<td  style=\"text-align:left\" >SBA<\/td>\n<td  style=\"text-align:center\" >0.10<\/td>\n<td  style=\"text-align:center\" >1.724<\/td>\n<\/tr>\n\r\n<tr><td  style=\"text-align:left\" ><\/td>\n<td  style=\"text-align:left\" >iMAPA (mean)<\/td>\n<td  style=\"text-align:center\" >0.10<\/td>\n<td  style=\"text-align:center\" >1.696<\/td>\n<\/tr>\n\r\n<tr><td  style=\"text-align:left\" >*<\/td>\n<td  style=\"text-align:left\" >iMAPA (mean)<\/td>\n<td  style=\"text-align:center\" >Optimal<\/td>\n<td  style=\"text-align:center\" >1.564<\/td>\n<\/tr>\n\r\n<tr><td  style=\"text-align:left\" >*<\/td>\n<td  style=\"text-align:left\" >iMAPA (median)<\/td>\n<td  style=\"text-align:center\" >Optimal<\/td>\n<td  style=\"text-align:center\" >1.482<\/td>\n<\/tr>\n<\/tbody><\/table><\/div><\/p>\n<p style=\"text-align: justify;\">The first three rows are taken from Table 2 in the paper. The last two rows refer to the new results (also highlighted with an *) for iMAPA with optimal parameters and mean or median combination of the temporally aggregated levels. We can observe interesting improvements for intermittent demand data, where methods typically perform similarly. When I get the chance I will look into the inventory implications in more detail.<\/p>\n<p style=\"text-align: justify;\">The updated <a title=\"Intermittent demand forecasting package for R\" href=\"http:\/\/kourentzes.com\/forecasting\/2014\/06\/23\/intermittent-demand-forecasting-package-for-r\/\">tsintermittent<\/a> package for R includes the new function &#8216;imapa&#8217; that was used to produce these results. To use it simply type:<\/p>\n<pre>&gt; imapa(ts.data2,outplot=1)<\/pre>\n<p><a href=\"http:\/\/kourentzes.com\/forecasting\/wp-content\/uploads\/2014\/07\/imapa.fig1_.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-518 size-full aligncenter\" src=\"http:\/\/kourentzes.com\/forecasting\/wp-content\/uploads\/2014\/07\/imapa.fig1_.png\" alt=\"imapa.fig1\" width=\"300\" height=\"214\" srcset=\"https:\/\/kourentzes.com\/forecasting\/wp-content\/uploads\/2014\/07\/imapa.fig1_.png 490w, https:\/\/kourentzes.com\/forecasting\/wp-content\/uploads\/2014\/07\/imapa.fig1_-150x107.png 150w, https:\/\/kourentzes.com\/forecasting\/wp-content\/uploads\/2014\/07\/imapa.fig1_-300x214.png 300w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">The function accepts different arguments for the minimum and maximum temporal aggregation level, the combination method, a-priori selected model parameters or optimised and various visualisations of the results, such as the following example that summarises what model was selected in each aggregation level, using the PK classification:<\/p>\n<p><a href=\"http:\/\/kourentzes.com\/forecasting\/wp-content\/uploads\/2014\/07\/imapa.fig2_.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-517 size-full aligncenter\" src=\"http:\/\/kourentzes.com\/forecasting\/wp-content\/uploads\/2014\/07\/imapa.fig2_.png\" alt=\"imapa.fig2\" width=\"300\" height=\"214\" srcset=\"https:\/\/kourentzes.com\/forecasting\/wp-content\/uploads\/2014\/07\/imapa.fig2_.png 490w, https:\/\/kourentzes.com\/forecasting\/wp-content\/uploads\/2014\/07\/imapa.fig2_-150x107.png 150w, https:\/\/kourentzes.com\/forecasting\/wp-content\/uploads\/2014\/07\/imapa.fig2_-300x214.png 300w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">Perhaps it is useful to note that if you select the same minimum and maximum temporal aggregation levels then iMAPA becomes similar to the ADIDA, albeit with automatic model selection and parameterisation, but constrained to using only Croston&#8217;s method, SBA or SES.<\/p>\n<div class=\"SPOSTARBUST-Related-Posts\"><H3>Related Posts<\/H3><ul class=\"entry-meta\"><li class=\"SPOSTARBUST-Related-Post\"><a title=\"Special issue on innovations in hierarchical forecasting\" href=\"https:\/\/kourentzes.com\/forecasting\/2020\/10\/25\/special-issue-on-innovations-in-hierarchical-forecasting\/\" rel=\"bookmark\">Special issue on innovations in hierarchical forecasting<\/a><\/li>\n<li class=\"SPOSTARBUST-Related-Post\"><a title=\"Intermittent demand &#038; THieF &#8211; EJOR Editors\u2019 Choice Articles\" href=\"https:\/\/kourentzes.com\/forecasting\/2020\/06\/08\/intermittent-demand-thief-ejor-editors-choice-articles\/\" rel=\"bookmark\">Intermittent demand &#038; THieF &#8211; EJOR Editors\u2019 Choice Articles<\/a><\/li>\n<li class=\"SPOSTARBUST-Related-Post\"><a title=\"Automatic robust estimation for exponential smoothing: perspectives from statistics and machine learning\" href=\"https:\/\/kourentzes.com\/forecasting\/2020\/06\/04\/automatic-robust-estimation-for-exponential-smoothing-perspectives-from-statistics-and-machine-learning\/\" rel=\"bookmark\">Automatic robust estimation for exponential smoothing: perspectives from statistics and machine learning<\/a><\/li>\n<\/ul><\/div><!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Recently I posted about a paper I co-authored with Fotios Petropoulos, now in JORS: Forecast Combinations for Intermittent Demand. There we found that for intermittent demand data using multiple levels of temporal aggregation, forecasting them with the appropriate models and finally combining the forecasts performed best. This approach has many analogies with the MAPA algorithm\u2026 <span class=\"read-more\"><a href=\"https:\/\/kourentzes.com\/forecasting\/2014\/07\/17\/mapa-and-intermittent-demand-forecasting\/\">Read More &raquo;<\/a><\/span><!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[41],"tags":[14,45,22,38,23,39,36],"_links":{"self":[{"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/posts\/511"}],"collection":[{"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/comments?post=511"}],"version-history":[{"count":0,"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/posts\/511\/revisions"}],"wp:attachment":[{"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/media?parent=511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/categories?post=511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/tags?post=511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->