How many mixed rye breads should a bakery chain bake next Monday? Ideally, every customer gets the bread of their choice without a loaf left over. Many factors go into the calculation, including sales the previous week, whether next Monday is a vacation, or whether the bread is currently being advertised. Translating them into input values for a computer program, it can calculate demand in several ways, for example:
Weight the factors and add up
Initial value: sales last Monday
if vacations, then minus 10 loaves
if advertising, then plus 20 loaves
1., 2., 3. …
Consider all cases individually
1st method: Weight the factors and sum them up.
2nd method: Consider all cases individually
if vacations and advertising, then plus 7 loaves of bread
1., 2., 3., …
The prediction becomes more accurate the more data is included, e.g. also the Monday rye mixed bread sales curve of the last years. The program learns from such data – hence the term machine learning (ML).
Today
Sales forecasts have long been part of the basics of business management. Among other things, they serve the following purposes:
Fast delivery.
How can online retailers deliver overnight when it takes two days just to ship from the central warehouse to the recipient? The solution to the riddle: the retailer knows what the customer will order before he does. Based on a demand forecast, quotas of goods are sent daily from the central warehouse to regional warehouses. From there, an item reaches the customer in 24 hours.
Tour planning
A sales forecast differentiated by location makes it possible to minimize the number of empty runs on delivery tours.
Dynamic prices.
On the web, the price of a flight changes every few minutes because a background program adjusts it to demand in real time. With digital price tags, this practice can be transferred to stationary retail.
Staff scheduling.
Staff scheduling.Anyone who repeatedly waits in line at the supermarket or call center at off-peak times just as long as at rush hour doubts the good will of the operator. With a short-cycle demand forecast based on long-term statistics, staff deployment can be better planned.
R&D projects are currently underway on the following prognostic requirements.
Bring forecasts to bear where they do not yet exist.
To do this: determine determinants, connect data sources, select forecast model and connect to client systems.
Factor in Covid-19.
Outliers such as the hoarding purchases at the beginning of the pandemic and the subsequent short- to medium-term demand dip must be modeled in the forecasting systems to keep the calculation realistic.
Improve forecasts with data from additional sources.
Information from the environment such as weather forecasts, Google search queries or trending topics from social media can refine the forecast.
Upgrade algorithms.
The sales forecast of a bakery chain outlined at the beginning is based on linear regression and decision trees, the simplest ML algorithms. More accurate results are provided by complex deep learning methods that take temporal relationships into account. These include neural networks with long short-term memory (LSTM) and so-called transformers.
ML applications process a broad spectrum of data. Since online retail collects much more data on prospects and customers than brick-and-mortar retail, such tools are widely used there.
Market segmentation and personalization.
In a household consisting of a mother (39), father (40), daughter (11) and son (10), the average age is 25. However, offering products for young professionals in their twenties to such a household would be a waste of time and money. Separately advertised articles for adults and children promise more success here. This segmentation of the clientele helps to find target groups for the inventory: Product seeks customers. The chances are even better if the prospective customer searches for the product. If you follow your customers on the Internet, you can display advertising that matches the occasion and purchase history in Google searches, social media, or e-mails, for example.
Recommendations.
Product recommendations are based on the criterion of similarity: one recommends more of the same to the customer, complementary products or those that other buyers of the same item have also ordered. The by no means trivial path from similarity to relevance is the subject of representation learning. The topic of product recommendations is also further researched in a practical manner. Like any personalized advertising, recommendations for new customers can be derived from browsing history and metadata such as browser type or operating system. If a pair of jeans is in the shopping cart, the recommendation service could show the customer a matching shirt.
Packaging optimization.
What shipping costs and whether the goods reach the customer in one piece depends on the size of the packaging, the padding and the void fill. Machine learning, for example from complaint statistics, helps to select the most suitable packaging for shipping multiple items.
Tomorrow
Basic research into machine learning began in the 1950s. But only since the nineties has the technical and financial environment developed in such a way that broad commercial use has become possible. Essential here are the rapid dissemination of new research results in blogs and open source systems, the exponentially growing supply of data, sufficient computing power for the commercially interesting analysis of this data and, last but not least, ample capital in the coffers of the technology companies.
The interaction of these factors can be seen, among other things, in the evolution of machine image recognition. A breakthrough was made in 1998 with LeNet-5, one of the first so-called Convolutional Neural Networks (CNN), which is one of the original forms of deep learning that has been used commercially since the early 1990s. Since 2009, researchers and developers have been working with the public image database ImageNet. This maintains a repository of fourteen million manually named images. The commanding victory of CNN’s “Alex- Net” in the 2012 ImageNet Large-Scale Visual Recognition Challenge (ILSVRC) popularized the use of GPUs to accelerate Deep Learning through parallelization. The competition took place from 2010 to 2017, and the source code of the winning models was published for use and further development by third parties.
Similar synergies accelerated machine imaging after the invention of Generative Adversarial Networks (GAN) in 2014. GAN are “networks in creative competition”: An artificial neural network, called a generator, produces image or sound data. A second network, the “discriminator” (examiner), is trained to distinguish the output of the generator from real recordings. From the examiner’s feedback, the generator iteratively learns to produce realistic artifacts.
In machine text production and translation, transformers and the pre-trained ML models BERT (Bidirectional Encoder Representations from Transformers, 2018) and GPT-3 (Generative Pretrained Transformer, 2020) based on them have been used since 2017. From huge corpora, transformers learn, among other things, semantic analogies, such as king behaves to queen as man behaves to woman.
In reinforcement learning, on the other hand, the system develops and refines a strategy for solving a problem not according to templates, but via a reward function. This process has produced artificial intelligences such as AlphaGo (2017) for the complex board game Go or AlphaStar (2019) for the video game StarCraft II, against which human opponents now have no chance.
How can the research on machine learning be made usable in retail? The following heuristics have proven their worth.
Almost all business processes include work steps that can only be automated with integrated ML functions. If you want to convert a supermarket to self-service checkouts, for example, you have to automate the weighing of fruit and vegetables. This requires image recognition that reliably distinguishes not only bananas from potatoes, but also varieties of the same species. Doing away with cash registers altogether, as Amazon is currently testing in stationary stores in several major U.S. cities, requires even more precise image recognition. Among other things, this must distinguish between customer property, such as a newspaper purchased elsewhere, and unpaid goods from the assortment, and record whether the customer places an item in the basket with the intention of buying it or puts it back on the shelf.
Currently, machine learning is suitable for routine tasks for which sufficient data is available.
Demand forecasts meet this criterion. With chatbots, one must differentiate: They can answer simple, common questions (FAQ or first-level support), but not specific inquiries.
Machine learning means drawing the right conclusions from data.
The data themselves form the specifications from which the application logic is derived. It follows, firstly, that sufficient data must be available (the requirements specification must be detailed enough). Second, the ML project can only be estimated after analyzing the data (assessing feasibility and effort based on the specifications). Third, the MLApp will only be as good as its database (errors in the specification lead to errors in the implementation).
The practice is not a data science competition.
Unlike the participants in a competition offered by websites such as www.kaggle.com, the developers of a commercial ML app have to create their own database. Most of this data is noisy, and preliminary investigations must clarify its usability. If the results are positive, questions must be formulated that match the data, technically and legally correct operation and reliable maintenance of the app must be organized and, in all of this, the insight of computer scientist Donald Knuth must be taken to heart: “Premature optimization is the root of all evil”.
“End-to-end digitization requires machine learning. Research, technology and practical experience now make it possible.”
– Dr. Guntram Hainke –
Areas of application
Virtual fitting room.
With online opticians, it is already common to put the desired frame on one’s nose virtually. To do this, the customer either uploads a portrait photo to the website or transfers his or her face to a digital mirror via webcam. The mirror superimposes an image of the glasses on the photo of the face and even follows the rotation of the head.
To reduce the number of returns and win over customers who are still unfamiliar with online shopping, textile web stores are also interested in virtual try-on. Here, however, implementation is much more difficult. New technologies such as style transfer with GAN can help.
Recognize false product reviews
Because many web shoppers rely on product reviews from other customers when making purchasing decisions, false or manipulative reviews pose a serious problem. With the aforementioned transformers from machine language processing (natural language processing, NLP, or computational linguistics), such manipulations can be detected more easily.
Robotics.
It is only through machine learning that mobile, autonomously acting automats will become suitable for everyday use. The spectrum of applications ranges from intelligent cleaning machines to order picking and inventory robots to drones that cover the last delivery mile.
Consileon helps companies commercialize the latest research in machine learning. Working as a team with your developers, our Data Scientists keep all risks under control on the way to ML project success. We have been able to prove this in the following projects, among others:
Inventory optimization by integrating a demand forecast into the merchandise management system
Development of systems for forecasting transaction volumes or delays
Improving the acceptance of CNN models by making confidence intervals more precise
Use of new NLP learning methods such as BERT for search optimization
This article is just one of many from our German brochure “Consileon Topic: Trends in Modern Software Development”. If we’ve piqued your interest and made you want to read more, feel free to order the entire brochure by clicking the “Order brochure” button below. Topics covered in the brochure include the practical benefits of artificial intelligence, agile software development in the retail industry, the profitable use of microservices, and the topic of intelligent workplaces.
Dr. Guntram Hainke
Dr. Guntram Hainke is a Senior Specialist at Consileon and supports retail and financial services companies in projects at the interface between business and IT. In addition to classical requirements analysis, business conception and software testing, his area of work includes in particular the evaluation and utilization of machine learning methods for productive use.
Four criteria characterize practical software development: Speed, maintainability of the product, scalability of both the development team and the software.
Originating as a digital version of the bulletin board, employee or intranet portals today offer centralized, protected, uniformly designed access to internal company information and IT applications.
Resource planners allocate personnel to upcoming work in terms of time and location. This is an operational task with a short- to medium-term time horizon. Numerous constraints are incorporated into the shift plan, including: