Manufacturing algorithms and industrial process data science consulting

Algorithms are being used across a wide range of industries to optimize and monitor manufacturing and industrial processes. We develop algorithms in languages like python and c++ which are custom-made from scratch for your business.

While industrial optimization (or “operations research”) has existed for a while, data science and machine learning are now also finding increasing applications in industry. According to the Royal Society, demand for data scientists has more than tripled in five years. Yet, particularly in industrial applications, there is a shortage of people with the necessary skills. This makes our consulting service quite unique.

Industries left and right are being disrupted by the applications of algorithms made possible by fast processors and reams of cheap data. What can algorithms accomplish for your business? Here are a few examples:

  • Optimizing manufacturing processes to minimize cost per unit and maximize product quality. For example, assembly line balancing which is an application of the mathematical assignment problem. This also includes queuing, scheduling, shipping and supply chain problems. 
  • Predictive maintenance – predicting which machine parts are likely to fail and when, to optimize when machine parts are replaced or scheduled for maintenance. A solution must be found which optimizes how limited maintenance and replacement budget is spent, while also minimizing failure and lost profit due to downtime
  • Predicting which units are faulty early in a production line rather than late, to reduce wastage
  • Optimizing network designs to reduce costs and minimize the probability of network failure
  • Algorithms to analyse sensor data gathered from industrial processes, including multiple sensor fusion and compensating for erroneous or incomplete data.
  • Data science and machine learning techniques can be used to create algorithms that adjust themselves based on data gathered from machinery in real time.
  • See also our page on algorithms for business strategy.


The astonishing complexity of modern industrial facilities means there is a lot of money to be saved through automation, optimization and data science techniques.

Just like with the game of chess, algorithms can be either completely autonomous, or merely provide information to augment the decision making capability of human operators. Automating decisions not only allows for the more efficient use of human labor, but can in various ways improve upon human decision making. After all, an algorithm can process large amounts of relevant data, monitor the factory continuously and react more quickly.

Machine learning algorithms are in Vogue due to their ability to detect patterns and relationships in data, and automate human decision making. But not all effective algorithms need machine learning techniques.

The impact of algorithms on every aspect of the economy is only going to grow. Algorithms are taking over the world.

We develop manufacturing algorithms and provide consulting services for all kinds of industrial data science. Interested in leveraging algorithms and data science to take your industry into the digital age? Drop us a message.

Business algorithms and data-based decision making consulting services

We offer business algorithm consulting services such as:

  • Data science techniques to analyse your data and extract business value
  • Decision making algorithms in languages like python and c++
  • Algorithms to automate processes in your business, including machine learning and AI
  • Optimization algorithms to optimize business processes

Algorithmic business is the approach of using mathematical algorithms to make decisions or optimize business activities. Most companies have already recognised the importance of investing in data-driven business algorithms. Forbes has called it the golden age of algorithms. See also Fortune’s article The Algorithm CEO. In this digital era of big data and fast computers, we are already seeing the impact of algorithms on business decision making. However, there is much more to come.

You’ve no doubt heard of examples like product recommendations and advert targeting, demand-based (dynamic) pricing, and predictive forecasting. But the scope of business algorithms extends far beyond these.

In fact, business algorithms can be used in any situation where data contains relevant information, but is particularly useful where machines can leverage the data in ways humans can not. Algorithms can make decisions within a fraction of a second which is important for time-critical applications, such as stock trading. The ability to act on data in real time, rather than wait days or weeks while human eyes analyse the information can be highly advantageous for businesses. Algorithms are also capable of analysing and integrating a vast array of disparate data sources which is simply beyond the capability of a human decision maker. And machine learning algorithms can discover relationships within data that humans wouldn’t suspect.

The process typically begins by noting all the data you have available to you, or which additional data sources you need to obtain. Then, mathematicians can get to work and, through data science, develop an algorithm which can output information of business value. Algorithms can be used to forecast the future, anticipate where faults are most likely to develop in a network or manufacturing process or which patients are most likely to develop a certain disease, automate processes that previously required human labor, find mathematically optimal solutions to resource deployment, match business operations to future demand and much more.

In particular, industrial algorithms are extremely important in configuring and optimizing manufacturing and logistics operations. See our page on machine learning. To learn more about the value that an algorithm and automation consulting service can bring to your business, see how algorithm consulting is taking over the world.

So, you’re a business owner who has heard stories about how your competitors are leveraging data and algorithms , and you want to get on board. Maybe you have a specific idea you want to discuss, or you’re just broadly interested in the possibilities. Either way, feel free to drop us a message to get the conversation started.

Sensor data analysis and sensor algorithm consulting services

Our firm offers sensor data and algorithm consulting services such as:

  • Writing algorithms in languages like python, C++ and Matlab to process data collected from sensors
  • Function fitting techniques to generate smooth functions from discrete sensor observations
  • Mathematical techniques to compensate for noisy data
  • Sensor fusion – integrating the output from multiple sensors
  • Machine learning techniques on sensor data
  • Inertial Measurement Unit (IMU) data processing and gps coordinates
  • Algorithms for 3D reconstruction of faces and objects
  • Mathematics and software development for sensor systems involving global positioning systems (GPS).

The development of cheap wireless sensors and mobile devices is causing an explosion is the ability of scientists and engineers to gather huge volumes of data. At the same time, our society is steamrolling towards artificial intelligence and automation. Since almost any autonomous device must have a means of gathering data on which to act, there is a close relationship between automation and sensor analytics. Since the scientists and engineers who gather this data usually are not mathematicians or data scientists, this rapid growth has created a shortage of people with the expertise to develop mathematical algorithms to process all this data and extract useful conclusions.

A spectral sensor, useful in remote sensing

What’s surprising is how quickly one runs into difficult mathematical problems dealing with sensor data, even with relatively simple sensors. Mathematical transformations are often required to convert the raw data into the relevant quantities. Since sensors often return partial or imperfect data, remarkably complex algorithms must be developed to determine which data points are likely erroneous, and try to fill in the gaps. Random noise in the data can necessitate sophisticated 2D or 3D function fitting algorithms. Difficult statistical problems arise in estimating the confidence intervals in the final metrics, such as key features of fuctions that have been fitted to noisy data.

Complex function fitting algorithms can be required to estimate key values from sensor data and determine the confidence intervals in those estimates

Customers utilizing a sensing device would prefer not to have to wait several seconds to see the output metrics. In fact, since storing the massive amount of data generated by a continuously active sensor is impractical, algorithms to process the data may even need to run in real time. This creates the challenges of writing fast, efficient algorithms, since even simple sensors can require algorithms that are computationally intensive. Since mobile devices like smart phones and ipads are often used to receive and process sensor data, the algorithms may need to complete quickly using only the computational resources of a mobile device.

The problem becomes even more interesting when you have multiple sensors. A network of similar and disparate sensor types whose data ranges overlap requires some interesting mathematics and statistics in order to combine the data sets into a single coherent picture. This is known as sensor fusion or data fusion.

Sometimes, the person designing the sensor system does not know themselves how to interpret the output of the sensor system. For example, if a network of sensors are monitoring different aspects of complicated machinery, which sensor outputs might indicate that some part of the machine is likely to fail and requires maintenance? This is where machine learning comes in. The mathematics of machine learning allows us to analyse historical data and find hidden features in the data that reliably predict a given outcome. Sometimes, these relationships may not be easily discernible by a human operator. Machine learning marries beautifully with sensor data analysis and has the potential to lead to engineering outcomes that are both effective and mathematically elegant. Check out this page on machine learning for remote sensing applications.

The proliferation of cheap sensors and computing technology is causing the rapid growth of sensor technologies in countless fields, including medical research, biomedical device development, geology, landscape mapping, manufacturing, and oil and gas industries. This is creating a strong demand for sensor data analysis and sensor algorithm development services.

Are you interested specifically in using machine learning techniques on sensor data to optimise industrial processes?

At Genius Mathematics Consultants, we’re as excited about the interesting mathematics of sensor data analysis as we are about making it work for your business. There’s few things more satisfying than solving interesting mathematics problems and seeing the result succeed commercially. Are you a scientist or engineer developing sensing technologies? We’re often told that with increasing specialisation, interdisciplinary collaboration is the future of research.

How algorithm consulting is taking over the world

The title is, of course, a play on the phrase, “Algorithms are taking over the world”.

But what makes an algorithm consultant more valuable to you than any other kind of consultant?

We all know that Algorithms are now doing many jobs that used to be done by people, with the speed of this transformation increasing. We also know that in some cases algorithms not only replace, but exceed the capabilities of human workers. According to an analysis by management consulting firm Mckinsey, about half of the activities currently carried out by human workers are susceptible to automation, and 15% of the global workforce could be displaced through automation by 2030. A report by the world economic forum has described it as the forth industrial revolution

But more jobs than those lost will be changed as algorithms complement human labour. Firms urgently need algorithm consultants to not just assist them in developing algorithms, but to retrain staff in their use.

From a finance perspective, consider that upwards of 80% of US stock trading is now done using algorithms. An algorithm can monitor such a huge volume of data and execute so rapidly that it renders direct human decision making obsolete. Instead, in algorithmic trading the human task is to design and monitor the algorithms.

Ok, so we’re all familiar with google home assistant. We’ve heard about medical diagnostic algorithms which can identify diseases with higher reliability than trained medical professionals. We’ve heard about facial recognition technology that can identify people from security cameras. And we know how algorithms are increasingly being used to automate business decisions. We know how important algorithms, sometimes called machine learning or artificial intelligence, are to the modern economy.

But what are the challenges?

Algorithms are often highly mathematical. They typically need to correctly analyse large amounts of imperfect data from several disparate sources, and integrate them to reach a decision (a process known as data fusion). Designing an algorithm that responds correctly in each situation isn’t easy, and often involves PhD level mathematics.

Machine learning algorithms are all the hype these days. But machine learning algorithms begin with a human expert specifying the form the algorithm will take. Machine learning techniques then use data to optimise the parameters of a model which has been specified and constructed by a human beforehand. And this is to say nothing of the propensity of machine learning techniques to learn spurious relationships. It’s important to understand that algorithm design still very much requires human experts, and it will be a very long time before AI advances to the point that this changes.

We believe our algorithm consulting service is ideally situated to move your business into the future. We’re passionate about collaborating with science and industry on research and development projects. To get the conversation started, don’t hesitate to contact us.

How math consultants can collaborate with your industry to drive innovation

As our world becomes more complex, fields of expertise are becoming more and more specialised. As knowledge grows, the amount any one person can be an expert in gets smaller. This means that now, more than ever, collaboration is the name of the game. You might like to take a look at Sciencemag’s article on successful collaboration, or the European Science Foundation’s publication on mathematics in industry.

There are no shortage of success stories demonstrating the applicability of mathematics to science and industry. As one of the most fundamental and abstract subjects, mathematics may be without peer in the broadness of its applications. Perhaps for no other discipline is it so important to form lines of communication and collaboration with other experts. And as the world becomes increasingly technically sophisticated, this fact will become ever more true. It’s important for both sides to determine a strategy through which mathematicians and other experts can strengthen their interactions to prepare for our highly technological future.

It sometimes doesn’t occur to people that their industry should seek the the expertise of mathematicians. Sometimes, this is because mathematics in their industry is working its magic under a different name or job title, such as engineer. They may not even be aware that there is such a thing as a math consultant, and therefore unlikely to seek one out. The completion of a PhD in a field of mathematics not only qualifies the holder within that field, but testifies to an ability to think creatively and solve difficult problems. Ironically, these skills make mathematicians the ideal consultants – even for problems that are not explicitly mathematical. They lend themselves so well to applied research and development tasks that the concept of a math consulting firm should be part of the lingo.

Encouragingly, surveys have found that managers express enthusiasm for collaborating with mathematicians, and genuinely believe that mathematics can provide them with a competitive edge. Yet, their own lack of familiarity with mathematics can make it difficult for them to drive the interaction from their side, and to generate project ideas.

So how can math consultants and other professionals improve collaboration?

  • Both sides should work to build professional connections with each other, even before any possible collaborative projects are apparent to either side. These connections may yield unforeseen fruit in the future.
  • Scientists, engineers and other professionals should discuss with mathematicians problems they are working on or facing in their fields. After all, you never know what value they may be able to add if they were only aware of the problem!
  • Since other professionals may not know enough about what mathematicians do to realise when they are needed, math consultants may need to “take it to them”. Mathematicians need to invest time in learning about the work being done in science and industry, and develop their own project proposals to present to industry leaders.
  • Many businesses and teams do not include a mathematician who would have the skills to solve difficult quantitative problems that arise in their field. Historically, this made it difficult for collaboration to occur. And increasing specialisation means teams would get larger and larger if they needed a permanent team member for every area of expertise that arises. Fortunately, the internet has created an unprecedented flexibility for working which means that you needn’t employ a full-time mathematician to reap the benefits. The expertise you need is only a few clicks away. Industry professionals should embrace online consulting as a convenient and cost-effective way to tap into the expertise of mathematicians

How I bested one of the top four financial consulting firms

\(\)You might assume that one of the largest financial consulting firms in the world with a net revenue in the tens of billions would be able to do some pretty good capital and risk modelling work. As a mathematician working in finance, I’ve come to realise that even the largest and most prestigious financial organisations routinely make critical errors in the design and validation of financial models. This is true not just for complex models, but even very simple ones.

In this article we’ll take a look at some risk modelling work performed by one of the “big four” financial consulting firms. The model is supposed to estimate how much capital a bank should hold to protect itself against large losses. As we’ll see, they could have hired Chim-Chim the monkey to design and validate a risk model for them with similar results (but at a significant cost advantage!)

So here’s what they did. A business manager, let’s call him “Bob”, used his knowledge of the business and memory of past losses to estimate the loss size that could occur in each part of the business, and on average how many years would pass before such a loss occurred. They divided each loss size by the corresponding numbers of years to yield a set of data points, to which they fitted a lognormal distribution by matching mean and variance, as given by the following formulae:

\[mu = \log(m^2 / \sqrt{v + m^2}),\]

\[\sigma = \sqrt{log(v/m^2 + 1}).\]

The bank determined that it would hold as capital the 99.9% quantile of the resulting distribution.

Let’s say bob comes up with loss estimates of $50 million every 5 years, $30 million every 3 years, and $25 million every 2 years. If you determine the parameters of the lognormal distribution from the above formulae and find the 99.9% quantile, you’ll get $16.2 million. The model provided by the financial consulting firm predicts that the bank should hold $16.2 million in capital, which will allegedly protect it against all but the 1 in a thousand year loss.

So what’s wrong with this approach?

First, think about the numbers – if we suffer a loss of $50 million every 5 years, how can $16.2 million cover the once in a thousand year loss! It doesn’t even cover the once in 5 year loss from only one of the three parts of the business! Clearly there’s something very wrong with this modelling work!

Next, let’s see if the model output changes in a reasonable way when we make a change to the input. Suppose Bob realises that he has forgotten about one important risk. You see, bob occasionally loses his pen. He estimates that he loses his pen about once a year, and that it costs the bank about $1 to replace it. Our consulting firm adds this data point to the model inputs and redoes the calculation. So what is the result now? Has the amount of capital gone up by a few bucks? Nope, it’s now $45.3 million! In order to insure bob against the risk of losing his pen, the bank has to hold an additional $29.2 million in capital! In fact, the cost of insuring that pen is almost twice as much as the $16.2 million required to ensure the entire business!

Ok, so this model is crazy. But what’s wrong from a mathematical perspective?

These analysts know about fitting a lognormal distribution to data, but there’s no depth to their understanding, causing them to design models that produce entirely meaningless numbers. When you fit a lognormal distribution to some data, you are making the assumption that the data is lognormally distributed. The data you are using therefore has to be representative of amounts chosen at random from the loss distribution. Because the standard deviation of the distribution is fixed to the standard deviation of the estimates, the closer together the estimates are, the smaller the amount of capital the model estimates!

But the data they were using was a fairly arbitrary collection of numbers gathered by considering different loss scenarios in different parts of the business. How spread out these numbers were was not something they were even conscious of – yet it was the critical determinant of risk. If Bob comes up with a few losses close together, the model won’t require the bank to hold much capital – even if those losses are very large. But if Bob comes up with losses far apart – even much smaller ones – then the model will require the bank to hold a huge amount of capital!

You would think banks would be outraged that they were paying so much money for models that were nothing but random number generators, and concerned that they weren’t holding the right amount of capital to prevent their business from collapsing. And it’s certainly not very good for the security of their customer’s money. How much money do you this financial consulting firm, one of the top four, charged for Chim-Chim the monkey numbers? If only the CEO knew how much money he paid external consultants to pretend to do risk modelling.

Can you believe these large financial consulting firms get paid a lot of money to validate risk models?

So, if you’re seeking professional financial modelling consulting, you could hire me to produce quality, meaningful capital numbers that will protect your business against unexpected losses. Or you could hire one of the big four to take a random stab in the dark while tripping over the washing basket – for ten times the cost!

Machine learning algorithm consulting

Interested in applying machine learning to your business, but not sure where to start?

Having heard about the many spectacular achievements of machine learning and it’s growing adoption, many businesses are keen to use it to gain competitive advantage. And, worried about being left behind if they don’t!

However, despite grand ambitions, the rapid growth of the field means there is a lack of people with the expertise to implement actual working solutions. Many businesses are in the position of having a lot of data, but no idea how they can use it!

Machine learning has been applied to such a diverse set of applications that one can only sample them:

  • Predicting which units are faulty early in a production line rather than late, to reduce wastage
  • Automatic fruit grading, sorting and shelf-life estimation based on attributes like weight, shape, and colour
  • Predicting which machine parts are likely to fail and when, to optimize when machine parts are replaced or scheduled for maintenance. A solution must be found which optimizes how limited maintenance and replacement budget is spent, while also minimizing failure and lost profit due to downtime
  • Optimizing the structure of a network to minimize the probability of failure for a given network cost
  • Automation of human roles in industry and manufacturing
  • Optimizing system configurations based on input like weather data, time of year, order numbers etc.

We’re interested in developing mutually beneficial collaborations with industry. To that end, we’d be interested in helping you explore if and how machine learning can increase profits, reduce wastage, and optimize the efficiency of your business.

Please explore the site to learn more about our algorithm consulting services (we offer general math consulting as well). Then, we’d love to get this conversation started, so please contact us to express your interest!

Remote Sensing Machine Learning

Remote sensing systems (such as LIDAR) allow us to measure a plethora of variables on the earth’s surface and in the air. This includes temperature, wind, vegetation, clouds, ice and many more. However, the relationship between the variable to be measured and the signal received can be complex, as radiation passing through the atmosphere is scattered and absorbed by clouds and molecules in the atmosphere. Attempting to determine this relationship using theory alone may be arduous. Machine learning is a natural alternative.

Let \(v\) denote some variable we wish to measure (perhaps on the earth’s surface), and \(s\) the signal received by the sensor (possibly located on a satellite). We wish to find a relationship

\[v = f(s),\]

that will allow us to convert the properties of the signal, which may contain data from several frequency bands, to the properties we actually wish to measure. Suppose we have gathered a large number of data pairs \((s_i,v_i)\). We can do this be recording the signal received \(s_i\) when the sensor is pointed at a location whose properties \(v_i\) are already known. We then use these data points to train or teach a neural network.

Ideally, the data used for fitting is only a subset of the total amount of data collected, so that the neural network can be cross-validated against data that was not used in the fitting process.

Machine learning has been applied to remote sensing in many practical applications including:

  • Measuring the chlorophyll concentration in the ocean
  • Classifying vegetation
  • Classifying cloud types
  • Measuring precipitation
  • Identifying snow cover
  • Forecasting

Of course, remote sensing is only one of an unlimited number of applications of machine learning. Whenever you wish to determine a relationship present in your data that may be too complex to determine using scientific theory, machine learning is an exciting alternative.

Network Reliability Optimization

Network reliability optimization problems first appeared for telecommunication and transport systems. These days, they also have applications in computer networks, and electric and gas networks. In the modern world, the consequences of a network failing can be catastrophic in terms of cost and even lives lost. Since many non-mathematical professionals need to design networks of various kinds, network optimization is a great example of how math consulting can deliver value for industry.

The goal of reliability optimization is to minimize the cost of the network, while ensuring it still meets some minimum standard of “reliability”, represented by the probability of the network failing.  Conceptually, a network can be represented by an undirected graph \(G = (N,E)\) with nodes \(N\) and edges \(E\):

Let \(x_{ij}\) represent which nodes we build connections between, i.e.\(x_{ij}=1\) if there is an edge between node \(i\) and node \(j\) and \(x_{ij}=0\) otherwise. Let \(c_{ij}\) represent the cost of building a connection between node \(i\) and node \(j\). Then the cost of building the network is

\[C(x) = \sum_{i=1}^{n-1} \sum_{j=i+1}^{n}c_{ij}x_{ij}.\]

Let \(p\) represent the probability that a node will be operational. There are two commonly used standards for when a network is considered to be operational, depending on the application:

  1. Two specified nodes are connected
  2. Every node is connected to every other node

It is then possible to assign to every network \(x\) a reliability \(R(x)\), which is the probability that the network will be operational. Suppose our tolerance for network failure is \(R_{min}\). Then we wish to minimize the cost function \(C(x)\) subject to the constraint \(R(x) \geq R_{min}\).

Mathematically speaking, network reliability problems are examples of integer programming problems, and can be solved in a variety of ways, such as using genetic algorithms.

Financial modelling consulting: Why do op risk models overstate the median loss?

A common choice of distribution for operational risk modelling is lognormal. This distribution has a fairly heavy tail and is mathematically and conceptually simple. Often a separate lognormal will be used to model the body and the tail of each risk cell, so that they can be parameterised separately. The body distribution can be chosen to closely match the common losses that occur in the internal data for that risk cell, which the tail can chosen to match the expectation of extreme losses. The necessity of this is questionable, since the high quantiles computed in op risk modelling are overwhelmingly driven by the tail. In most cases, if model simplicity is desired, a single distribution using the tail parameters is sufficient.

Once the loss severity distribution has been estimated for each risk cell, along with a corresponding frequency distribution (typically Poisson, although op risk models are not sensitive to this choice), then Monte Carlo simulation is used to sum them and produce the bank’s total or aggregate loss distribution. The modeller may then be surprised to discover that the median aggregate loss is far higher than the bank’s typical annual loss! After all, the median loss from the body distribution matches that in the internal data for each risk cell, so shouldn’t the  same be true of the aggregate distribution?

The explanation here lies in the heavy tailed nature of the lognormal distribution. In particular, the lognormal has the property that for large \(N\), the sum of \(N\) randomly generated losses approaches the maximum loss, i.e.

\[\sum_{i=1}^N x_i \to \max(\{x_i\}).\]

This means that, surprisingly, even a typical loss in the aggregate distribution (say, the median) is primarily constituted by a small number of tail losses from the individual distributions, and not losses near the medians! Thus, the medians of the individual distributions end up being pretty much irrelevant.

Of course, op risk models are typically constructed to estimate the 99.9% quantile, not the median (which banks have data for anyway). However, it is instructive to note that it is very difficult to model op risk in a way that accurately reproduces both the extreme losses, and the more common losses, due to the heavy tailed nature of the distributions.

This illustration shows how even relatively simple financial modelling problems can result in technical complexities that are very difficult for finance profressionals to understand and resolve. This is a great example of how our quantitative analysis consulting services can deliver great value and impress the regulators!