The Art of Problem Solving with Data

End of month profit predictions are difficult to foresee (especially for individual products of interest) but are invaluable to a modern business’s success and growth. How does one make these predictions or even conceptualise a high-level approach? A once off, unique solution might solve the problem this time, but they do not scale well, leaving the problem to arise again next month.

Business questions and problems to solve (such as profitability expectations) occur seasonally (daily, weekly, monthly, or annually) and they evolve and grow with time. Questions like “Can predict a different performance indicator/product?” or “What about a different prediction model or training method?” cannot be solved using a simple spreadsheet. Small changes in requirements lead to cascading changes in the analysis. Continuous success requires a solution that can evolve and scale, and to do this, one must break the solution down i.e., make it modular.

The “what” and “why” of modularity

Modularity is a software design technique that results in code that is easily separable. Instead of a single calculation (or formula) that solves one specific problem, we separate data reading, data preparation, prediction, and display functionality. Each of these “modules” deal with solving a particular aspect of the problem.

This abstraction helps one see the bigger picture, knowing each individual module is effectively solving a particular (reoccurring) task. Modularity results in a toolbox of solution modules that can be combined to solve any established problem, or minimally expanded to solve a new one with minimal maintenance needed.

A benefit of the modular approach is that updates or bug fixes are only needed on the required module. As long as the way the modules communicate remain unchanged, any changes will remain local.

In Practice

A company has been in business for quite some time now, enough time to have a substantial set of data on their monthly revenue and what contributes to it. To better plan for their future, they now want to predict, roughly, what their end of month revenue will be at the start of the month, given the trends seen previously. The process of building this model can be broken down into four phases:

  1. Obtaining the data,
  2. Cleaning the data,
  3. Training the model and predicting the revenue,
  4. Reporting on the results.

The company could execute this as a single spreadsheet exercise, running through the steps and getting this task done, but instead, having read an informative article on the matter, they decide to go with a modular design, with each of the four components being created independently before being brought together to provide the required solution.

Over the next few weeks, the revenue predictor gains traction and awareness within the company and the model must be refined to improve its accuracy as more people rely on it. This requires the data being used to be refined (though not expanded on) and the model must be retrained, but the output remains the same. The company now benefits from modularity because they only need to update their data cleaning and the prediction model, while the data ingestion and reporting modules can remain as they were before.

The company continues to expand, and as they do so, the number of products they sell increases. They would now like to make predictions on product sales along with the existing revenue prediction. New data must be extracted and cleaned, however the model remains the same requiring some changes to accommodate each of the products and only some of the reporting needs changing. While new modules need to be defined for this, they can be based off the existing ones and, by sticking to the same modular principles, the algorithm can be adapted in stages that are easier to track and update.

Thanks to the modular approach, the company is now free to track and predict every aspect of their growth as the definition of this itself also grows. This can be done in a fast, easy to understand way for their future.


In such an uncertain economy, finding a way to gain a competitive edge may feel like looking for a needle in a haystack. It’s costly enough keeping your finger on the pulse of your market, so leveraging techniques in-house that sustainably grow your business is a strategic decision.

Book a consultation with Opti-Num today to find out how we can blend our established, modular solutions along with well planned, bespoke new ones to assist your business in all its advanced analytics needs.

What Can I Do Next?