Dialing it In: How KIS Used Machine Learning to Help a Major Consumer Goods Company Boost Productivity

overview

In 2020, a major consumer goods company approached KIS to improve the efficiency of its powdered soap manufacturing division. Their factory was already the most technologically advanced of its type in the world, and the company’s team was well-qualified to interpret and validate their data. But they were spending millions in materials and operating hours running test batches to formulate their products. The company knew there had to be a better approach. How could they accurately predict the quality of their product without wasting so much money? To find the answer, they turned to KIS.

industry

consumer goods

time

3 - 6 months

tech

Machine Learning, Artificial Intelligence, Web Services

The Challenge

Each soap product manufactured by the company featured a unique density of materials. Factors like temperature, water level, vacuum pressure, etc., all contributed to the densities.  

To accurately predict the variables that produced each product’s density, we needed data taken from each production phase. Fortunately, the client had already outfitted the factory with sensors at each phase that took measurements and sent the data to a cloud.  

Our challenge was to use this data to create three Machine Learning models capable of reliably predicting density after each phase.

With these models in place, users could adjust input variables to create new products and validate existing product formulas virtually without running physical test batches, saving the company time and money while simplifying the workflow.  

The Solution: A Virtual Factory  

To address the client’s problem, we broke the production process down into three distinct phases:  

  1. The Drying Phase: The product begins as a liquid that is dried into a powder.  
  1. The Mixing Phase: The powder is combined with other powders to create the product formula.  
  1. The Packaging Phase: The product loses density as it is dispensed and packaged.  

Our plan was to create models to predict the product’s density after each phase.  

A Practical Approach  

At first glance, Machine Learning seemed like the perfect solution for the client’s problem. But we wanted to be sure.  

Often, ML is like a hammer in search of a nail. Due to the buzz surrounding it, companies use ML to address problems otherwise easily solved by more conventional means. KIS isn’t one of those companies.  

We began by analyzing the client’s data to make sure Machine Learning really was the best solution.  

The client sent KIS 18 months' worth of data on the three soap products produced at the factory. Our team validated the data and looked for correlations that would help ML models accurately predict product density.

In the end, our ML experts found that the project was a perfect match for Machine Learning’s capabilities.  

Understanding ML

Now that we’d determined that Machine Learning was the way to go, we had to decide which ML models would work best for this application. There are hundreds of ML models available, and choosing the best one for a given project is no easy task.

However, our experts understood the kinds of ML architectures that worked best with the data provided by the factory sensors. Instead of trying different models randomly, they came up with the best models for the job.  

After only a month spent validating the data and running benchmarks, we arrived at a model that predicted outcomes from the drying and mixing phases with a maximum accuracy of 92%! This far exceeded human capabilities and proved that our models could reliably replace physical testing.  

But, there was one area where KIS still saw room for improvement: The User Experience.

Virtual Factory UI

As accurate as our new Machine Learning models were, they wouldn’t do the company much good if no one knew how to use them.  

Our solution was an attractive, user-friendly interface that replicated the factory virtually. This “digital twin” of the factory allowed users to visualize the production processes, manipulate product formulas, and read the outcomes as easily as if they were running physical test batches.  

By placing ourselves in the employees’ shoes, we came up with a solution that not only worked but made their jobs even easier.  

Putting it Into Action

With our models implemented, the factory’s efficiency increased. The company’s ability to validate its products was at an all-time high, and the client was no longer wasting valuable time, money, and materials running test batches.  

What We Built  

Analysis  

  • We analyzed data, looking for correlations (see heat map)  
  • We found positive and negative correlations in the data, making it a good fit for ML  
  • Feature importance analysis: we determined which variables should be part of the model, and which ones should be discarded (not aggregating enough value for the processing costs)
  • Feature creation by combination to create additional metrics for tuning model
  • SME analysis: we worked with scientists and data experts to validate the data through SME empiric knowledge  
  • We set thresholds and boundaries before running model trainings  

Code  

  • Once we had a final data frame, we aligned the variables on the same time stamp in an aggregation level
  • We trained ~15 different architectures using Pandas and Scikit Learning  
  • Using data holdouts for test purposes, we calculated the success rate of each model’s architecture  
  • We chose the best architectures and explored other potential models with similar architectures
  • After a funnel of decisions and benchmarks, we arrived at the 2 best models, then integrated them on the Digital Twin UI tool  
  • The models behaved well and each exhibited unique capabilities, so we moved them on to the Fine Tunning process  
  • We calibrated all the external parameters by doing heuristic races and combined different model architectures both horizontally (combining two results) and vertically (splitting the problem into pieces and leaving a single architecture to solve each piece)  
  • After testing, we found that the new model predicted outcomes with ~92% accuracy.
  • The binary file was replaced on the Digital Twin UI tool  

Digital Twin UI Tool

  • An Angular application that receives all variable inputs and connects with a trained model binary through REST API call  
  • The design mirrors the physical factory in a virtual space, making it easy and intuitive for a non-technical user to interact with the ML model

Infrastructure  

  • Code was done in Python, with support of libraries such as NumPy, Pandas, Scikit Learning and Tensor Flow  
  • Development was on Jupyter Notebook, and hosted on Azure ML Service Workspaces  
  • Data is read from Azure Data Explorer, dumping snapshots on Azure Data Lake Gen 2 every 3 months, and consumed directly on Jupyter  
  • Training process reads from Jupyter and uses Cloud Machine Learning for data and training computing, generating output trained model binary  
  • REST API is exposed using Azure Containers Instances for Machine Learning, providing a proper interface for client consumption  
  • UI Digital Twin tool is static Angular application, hosted on Azure Storage Accounts, wrapped by a CDN, with data transfer exclusively to Azure Container Instances  

The Result

By taking a practical approach to this project, KIS implemented advanced Machine Learning technology in a way that solved the client’s production problem and simplified their factory’s workflow.  

Without jumping to flashy solutions or overcomplicating the issue, we addressed the problem with the exact level of complexity it demanded.  

Our team worked quickly and efficiently, creating ML models in under a month with enough accuracy to eliminate the need for physical testing at the factory.

As a result, these models saved the client from wasting materials and operation costs while providing employees with an easy-to-use UI that makes validating product formulas quick and easy.  

The client was thrilled with the result and continues to work with us to this day. KIS is currently in the process of implementing the next model in the series which will no doubt continue to increase efficiency.  

a few nice words

At KIS, we see ourselves as Software Generalists. We don’t go into any project with a single solution in mind. We take a holistic view of the problem and come up with the simplest solution to address it. In this case, Machine Learning was the perfect solution, and our ML experts were more than suited to the task. But, where a consultancy that only specializes in ML might have left the client with a mess of unwieldy tech, we had the expertise to implement a UI that made navigating the technology easy and intuitive. By maintaining a diverse team and keeping our tech solutions people-focused, we did everything in-house and solved the client's problem as quickly and sustainably as possible.

our success cases.

We thrive on creating business value through strategy, technology and design

tech too complex?
it doesn't have to be.

There’s a big difference between tech that simply works and tech that works for you.
By assessing problems objectively and focusing on the user experience, we design our end-to-end tech solutions to suit your exact business needs.
No more bloated software or complicated UI’s. We keep it simple.

tech strategy & consulting.

Empowering companies, investing in IT, tech training, 
scalable squads, and delivering the right value.

data
management.

Data migration, conversion, analysis and integration.

Database consolidation and management.

machine learning models.

Use AI algorithms and data to improve the accuracy of your analysis and make better predictions that impact the decision making processes.

web services development.

From discovery to delivery, we solve issues that go beyond the basics.

more about our services

arrow_right_alt

let's build something
great together.

Reach out with an idea or a problem and we’ll get back as soon as we can.