Confused about AI and Machine Learning?

Are you confused about what is AI and what is machine learning? Are you unsure why knowing more will help you with your job in inventory planning? Don’t despair. You’ll be ok, and we’ll show you how some of whatever-it-is can be useful.

What is and what isn’t

What is AI and how does it differ from ML? Well, what does anybody do these days when they want to know something? They Google it. And when they do, the confusion starts.

One source says that the neural net methodology called deep learning is a subset of machine learning, which is a subset of AI. But another source says that deep learning is already a part of AI because it sort of mimics the way the human mind works, while machine learning doesn’t try to do that.

One source says there are two types of machine learning: supervised and unsupervised. Another says there are four: supervised, unsupervised, semi-supervised and reinforcement.

Some say reinforcement learning is machine learning; others call it AI.

Some of us traditionalists call a lot of it “statistics”, though not all of it is.

In the naming of methods, there is a lot of room for both emotion and salesmanship. If a software vendor thinks you want to hear the phrase “AI”, they may well say it for you just to make you happy.

Better to focus on what comes out at the end

You can avoid some confusing hype if you focus on the end result you get from some analytic technology, regardless of its label. There are several analytical tasks that are relevant to inventory planners and demand planners. These include clustering, anomaly detection, regime change detection, and regression analysis. All four methods are usually, but not always, classified as machine learning methods. But their algorithms can come straight out of classical statistics.

Clustering

Clustering means grouping together things that are similar and distancing them from things that are dissimilar. Sometimes clustering is easy: to separate your customers geographically, simply sort them by state or sales region. When the problem is not so dead obvious, you can use data and clustering algorithms to get the job done automatically even when dealing with massive datasets.

For example, Figure 1 illustrates a cluster of “demand profiles”, which in this case divides all a customer’s items into nine clusters based on the shape of their cumulative demand curves. Cluster 1.1 in the top left contains items whose demand has been petering out, while Cluster 3.1 in the bottom left contains items whose demand has accelerated.  Clustering can also be done on suppliers. The choice of number of clusters is typically left to user judgement, but ML can guide that choice.  For example, a user might instruct the software to “break my parts into 4 clusters” but using ML may reveal that there are really 6 distinct clusters the user should analyze. 

 

Confused about AI and Machine Learning Inventory Planning

Figure 1: Clustering items based on the shapes of their cumulative demand

Anomaly Detection

Demand forecasting is traditionally done using time series extrapolation. For instance, simple exponential smoothing works to find the “middle” of the demand distribution at any time and project that level forward. However, if there has been a sudden, one-time jump up or down in demand in the recent past, that anomalous value can have a significant but unwelcome effect on the near-term forecast.  Just as serious for inventory planning, the anomaly can have an outsized effect on the estimate of demand variability, which goes directly to the calculation of safety stock requirements.

Planners may prefer to find and remove such anomalies (and maybe do offline follow-up to find out the reason for the weirdness). But nobody with a big job to do will want to visually scan thousands of demand plots to spot outliers, expunge them from the demand history, then recalculate everything. Human intelligence could do that, but human patience would soon fail. Anomaly detection algorithms could do the work automatically using relatively straightforward statistical methods. You could call this “artificial intelligence” if you wish.

Regime Change Detection

Regime change detection is like the big brother of anomaly detection. Regime change is a sustained, rather than temporary, shift in one or more aspects of the character of a time series. While anomaly detection usually focuses on sudden shifts in mean demand, regime change could involve shifts in other features of the demand, such as its volatility or its distributional shape.  

Figure 2 illustrates an extreme example of regime change. The bottom dropped out of demand for this item around day 120. Inventory control policies and demand forecasts based on the older data would be wildly off base at the end of the demand history.

Confused about AI and Machine Learning Demand Planning

Figure 2: An example of extreme regime change in an item with intermittent demand

Here too, statistical algorithms can be developed to solve this problem, and it would be fair play to call them “machine learning” or “artificial intelligence” if so motivated.  Using ML or AI to identify regime changes in demand history enables demand planning software to automatically use only the relevant history when forecasting instead of having to manually pick the amount of history to introduce to the model. 

Regression analysis

Regression analysis relates one variable to another through an equation. For example, sales of window frames in one month may be predicted from building permits issued a few months earlier. Regression analysis has been considered a part of statistics for over a century, but we can say it is “machine learning” since an algorithm works out the precise way to convert knowledge of one variable into a prediction of the value of another.

Summary

It is reasonable to be interested in what’s going on in the areas of machine learning and artificial intelligence. While the attention given to ChatGPT and its competitors is interesting, it is not relevant to the numerical side of demand planning or inventory management. The numerical aspects of ML and AI are potentially relevant, but you should try to see through the cloud of hype surrounding these methods and focus on what they can do.  If you can get the job done with classical statistical methods, you might just do that, then exercise your option to stick the ML label on anything that moves.

 

 

How to Forecast Inventory Requirements

Forecasting inventory requirements is a specialized variant of forecasting that focuses on the high end of the range of possible future demand.

For simplicity, consider the problem of forecasting inventory requirements for just one period ahead, say one day ahead. Usually, the forecasting job is to estimate the most likely or average level of product demand. However, if available inventory equals the average demand, there is about a 50% chance that demand will exceed inventory and result in lost sales and/or lost good will. Setting the inventory level at, say, ten times the average demand will probably eliminate the problem of stockouts, but will just as surely result in bloated inventory costs.

The trick of inventory optimization is to find a satisfactory balance between having enough inventory to meet most demand without tying up too many resources in the process. Usually, the solution is a blend of business judgment and statistics. The judgmental part is to define an acceptable inventory service level, such as meeting 95% of demand immediately from stock. The statistical part is to estimate the 95th percentile of demand.

When not dealing with intermittent demand, you can often estimate the required inventory level by assuming a bell-shaped (Normal) curve of demand, estimating both the middle and the width of the bell curve, then using a standard statistical formula to estimate the desired percentile. The difference between the desired inventory level and the average level of demand is called the “safety stock” because it protects against the possibility of stockouts.

When dealing with intermittent demand, the bell-shaped curve is a very poor approximation to the statistical distribution of demand. In this special case, Smart leverages patented technology for intermittent demand that is designed to accurately forecast the ranges and produce a better estimate of the safety stock needed to achieve the required inventory service level.

 

Everybody forecasts to drive inventory planning. It’s just a question of how.

Reveal how forecasts are used with these 4 questions.

Often companies will insist that they “don’t use forecasts” to plan inventory.  They often use reorder point methods and are struggling to improve on-time delivery, inventory turns, and other KPIs. While they don’t think of what they are doing as explicitly forecasting, they certainly use estimates of future demand to develop reorder points such as min/max.

Regardless of what it is called, everyone tries to estimate future demand in some way and uses this estimate to set stocking policies and drive orders. To improve inventory planning and make sure you aren’t over/under ordering and creating large stockouts and inventory bloat, it is important to understand exactly how your organization uses forecasts. Once this is understood, you can assess whether the quality of the forecasts can be improved.

Try getting answers to the following questions. It will reveal how forecasts are being used in your business – even if you don’t think you use forecasts.

1.  Is your forecast a period-by-period estimate over time that is used to predict what on-hand inventory will be in the future and triggers order suggestions in your ERP system?

2. Or is your forecast used to derive a reorder point but not explicitly used as a per-period driver to trigger orders? Here, I may predict we’ll sell 10 per week based on the history, but we are not loading 10, 10, 10, 10, etc., into the ERP. Instead, I derive a reorder point or Min that covers the two-period lead time + some amount of buffer to help protect against stock out. In this case, I’ll order more when on hand gets to 25.

3. Is your forecast used as a guide for the planner to help subjectively determine when they should order more?  Here, I predict 10 per week, and I assess the on-hand inventory periodically, review the expected lead time, and I decide, given the 40 units I have on hand today, that I have “enough.” So, I do nothing now but will check back again in a week.

4. Is it used to set up blanket orders with suppliers? Here, I predict 10 per week and agree to a blanket purchase order with the supplier of 520 per year. The orders are then placed in advance to arrive in quantities of 10 once per week until the blanket order is consumed.

Once you get the answers, you can then ask how the estimates of demand are created.  Is it an average? Is it deriving demand over lead time from a sales forecast?  Is there a statistical forecast generated somewhere?  What methods are considered? It will also be important to assess how safety stocks are used to protect against demand and supply variability.  More on all of this in a future article.

 

What Silicon Valley Bank Can Learn from Supply Chain Planning

​If you had your head up lately, you may have noticed some additional madness off the basketball court: The failure of Silicon Valley Bank. Those of us in the supply chain world may have dismissed the bank failure as somebody else’s problem, but that sorry episode holds a big lesson for us, too: The importance of stress testing done right.

The Washington Post recently carried an opinion piece by Natasha Sarin called “Regulators missed Silicon Valley Bank’s problems for months. Here’s why.” Sarin outlined the flaws in the stress testing regime imposed on the bank by the Federal Reserve. One problem is that the stress tests are too static. The Fed’s stress factor for nominal GDP growth was a single scenario listing presumed values over the next 13 quarters (see Figure 1). Those 13 quarterly projections might be somebody’s consensus view of what a bad hair day would look like, but that’s not the only way things could play out.  As a society, we are being taught to appreciate a better way to display contingencies every time the National Weather Service shows us projected hurricane tracks (see Figure 2). Each scenario represented by a different colored line shows a possible storm path, with the concentrated lines representing the most likely.  By exposing the lower probability paths, risk planning is improved.

When stress testing the supply chain, we need realistic scenarios of possible future demands that might occur, even extreme demands.   Smart provides this in our software (with considerable improvements in our Gen2 methods).  The software generates a huge number of credible demand scenarios, enough to expose the full scope of risks (see Figure 3). Stress testing is all about generating massive numbers of planning scenarios, and Smart’s probabilistic methods are a radical departure from previous deterministic S&OP applications, being entirely scenario based.

The other flaw in the Fed’s stress tests was that they were designed months in advance but never updated for changing conditions.  Demand planners and inventory managers intuitively appreciate that key variables like item demand and supplier lead time are not only highly random even when things are stable but also subject to abrupt shifts that should require rapid rewriting of planning scenarios (see Figure 4, where the average demand jumps up dramatically between observations 19 and 20). Smart’s Gen2 products include new tech for detecting such “regime changes”  and automatically changing scenarios accordingly.

Banks are forced to undergo stress tests, however flawed they may be, to protect their depositors. Supply chain professionals now have a way to protect their supply chains by using modern software to stress test their demand plans and inventory management decisions.

1 Scenarios used the Fed to stress test banks Software

Figure 1: Scenarios used the Fed to stress test banks.

 

2 Scenarios used by the National Weather Service to predict hurricane tracks

Figure 2: Scenarios used by the National Weather Service to predict hurricane tracks

 

3 Demand scenarios of the type generated by Smart Demand Planner

Figure 3: Demand scenarios of the type generated by Smart Demand Planner

 

4 Example of regime change in product demand after observation #19

Figure 4: Example of regime change in product demand after observation #19

 

 

Supply Chain Math: Don’t Bring a Knife to a Gunfight

Whether you understand it in detail yourself or rely on trustworthy software, math is a fact of life for anyone in inventory management and demand forecasting who is hoping to remain competitive in the modern world.

At a conference recently, the lead presenter in an inventory management workshop proudly proclaimed that he had no need for “high-fallutin’ math”, which was explained to mean anything beyond sixth-grade math.

Math is not everyone’s first love. But if you really care about doing your job well, you can’t approach the work with a grade school mentality. Supply chain tasks like demand forecasting and inventory management are inherently mathematical. The blog associated with edX, a premier site for online college course material, has a great post on this topic, at https://www.mooc.org/blog/how-is-math-used-in-supply-chain. Let me quote the first bit:

Math and the supply chain go hand and hand. As supply chains grow, increasing complexity will drive companies to look for ways to manage large-scale decision-making. They can’t go back to how supply chains were 100 years ago—or even two years ago before the pandemic. Instead, new technologies will help streamline and manage the many moving parts. The logistics skills, optimization technologies, and organizational skills used in supply chain all require mathematics.

Our customers don’t need to be experts in supply chain math, they just need to be able to wield the software that contains the math. Software combines users’ experience and subject matter expertise to produce results that make the difference between success and failure. To do its job, the software can’t stop at sixth-grade math; it needs probability, statistics, and optimization theory.

It’s up to us software vendors to package the math in such a way that what goes into the calculations is all that is relevant, even if complicated; and that what comes out is clear, decision-relevant, and defensible when you must justify your recommendations to higher management.

Sixth-grade math can’t warn you when the way you propose to manage a critical spare part will mean a 70% chance of falling short of your item availability target. It can’t tell you how best to adjust your reorder points when a supplier calls and says, “We have a delivery problem.” It can’t save your skin when there is a surprisingly large order and you have to quickly figure out the best way to set up some expedited special orders without busting the operating budget.

So, respect the folk wisdom and don’t bring a knife to a gunfight.

 

 

The Supply Chain Blame Game: Top 3 Excuses for Inventory Shortage and Excess

1. Blaming Shortages on Lead Time Variability
Suppliers will often be late, sometimes by a lot. Lead time delays and supply variability are supply chain facts of life, yet inventory carrying organizations are often caught by surprise when a supplier is late.  An effective inventory planning process embraces these facts of life and develops policies that effectively account for this uncertainty.  Sure, there will be times when lead time delays come out of nowhere.  But most often the stocking policies like reorder points, safety stocks, and Min/Max levels aren’t recalibrated often enough to catch changes in the lead time over time.  Many companies only review the reorder point after it has been breached, instead of recalibrating after each new lead time receipt.  We’ve observed situations where the Min/Max settings are only recalibrated annually or are even entirely manual.  If you have a mountain of parts using old Min/Max levels and associated lead times that were relevant a year ago, it should be no surprise that you don’t have enough inventory to hold you until the next order arrives.

 

2. Blaming Excess on Bad Sales/Customer Forecasts
Forecasts from your customers or your sales team are often intentionally over-estimated to ensure supply, in response to past inventory shortages where they were left out to dry. Or, the demand forecasts are inaccurate simply because the sales team doesn’t really know what their customer demand is going to be but are forced to give a number. Demand Variability is another supply chain fact of life, so planning processes need to do a better job account for it.  Why should rely on sales teams to forecast when they best serve the company by selling? Why bother playing the game of feigning acceptance of customer forecasts when both sides know it is often nothing more than a WAG?  A better way is to accept the uncertainty and agree on a degree of stockout risk that is acceptable across groups of items.  Once the stockout risk is agreed to, you can generate an accurate estimate of the safety stock needed to counter the demand variability.  The catch is getting buy-in, since you may not be able to afford super high service levels across all items.  Customers must be willing to pay a higher price per unit for you to deliver extremely high service levels.  Sales people must accept that certain items are more likely to have backorders if they prioritize inventory investment on other items.  Using a consensus safety stock process ensures you are properly buffering and setting the right expectations.  When you do this, you free all parties from having to play the prediction game they were not equipped to play in the first place.

 

3. Blaming Problems on Bad Data
“Garbage In/Garbage Out” is a common excuse for why now is not the right time to invest in planning software. Of course, it is true that if you feed bad data into a model, you won’t get good results, but here’s the thing:  someone, somewhere in the organization is planning inventory, building a forecast, and making decisions on what to purchase. Are they doing this blindly, or are they using data they have curated in a spreadsheet to help them make inventory planning decisions? Hopefully, the latter.  Combine that internal knowledge with software, automating data import from the ERP, and data cleansing.  Once harmonized, your planning software will provide continually updated, well-structured demand and lead time signals that now make effective demand forecasting and inventory optimization possible.  Smart Software cofounder Tom Willemain wrote in an IBF newsletter that “many data problems derive from data having been neglected until a forecasting project made them important.” So, start that forecasting project, because step one is making sure that “what goes in” is a pristine, documented, and accurate demand signal.