The evolution of artificial intelligence, as well as machine learning has gained momentum in the last few years. The constant drive to increase the computing power of computers has given the opportunity to use algorithms and mathematical apparatus created in the second half of the 20th century on an unprecedented scale. With the imminent arrival of a commercial quantum computer, we can slowly become afraid of scenes from the movies with Arnold Schwarzenegger as Terminator. However, without going too far into the future, and focusing on the present, I decided to check the possibilities offered by the technology available today and whether it can be used to predict the spread of COVID-19 disease.

What is machine learning?

There are many definitions of machine learning on the web: ideological, strictly mathematical, and even philosophical. Trying to define this term myself, I found that it is best to focus on comparing machine learning with classical programming.

Comparison of machine learning with traditional programming

1) Comparison of machine learning with traditional programming

Apart from all kinds of software development methodologies (object-oriented, structural, functional, etc.), most of us know and understand what traditional programming is all about: having input data and using an algorithm suitable for solving a particular problem, we get results – output data.

For example: the algorithms used in banking are predefined, and due to their precise implementation we do not worry whether the internet transfer we send will surely reach the recipient and the balance on our accounts will match.

Sample algorithm in traditional programming

2) Sample algorithm in traditional programming

So it seems that by creating the correct algorithm we are able to solve any task, and this is absolutely true. However, the problem arises when creating such an algorithm is not trivial, and sometimes even impossible.

A good example of such a problem (staying in the financial zone) would be an algorithm predicting the exact prices of companies’ shares on the stock exchange with anticipation – there is no rigid framework and rules here that would describe the behavior of the share price. The final price is influenced by hundreds if not thousands of different variables, sometimes single unpredictable decisions of presidents or even natural disasters. It is completely impossible to design and implement such an algorithm which would precisely solve this problem. Moreover – even if we would like to make an attempt to create an algorithm that would at least roughly determine the behavior of the future price of a given asset (e.g. return the information whether the price will increase or decrease tomorrow) – it would be a very breakneck task, requiring a lot of domain knowledge from brokerage fields and very complicated dependencies resulting from the multitude of variables that would affect the result.

Here, machine learning comes in handy, which is in a way a reversal of the problem area – instead of calculating specific output values with the help of a specific algorithm (as in traditional programming), let’s try to find an algorithm that will reproduce the output data we know as accurately as possible. The ingenious in its simplicity approach, supported by solid mathematical equations, opens up unlimited possibilities of solving problems that would be difficult and in most cases impossible in the traditional way.

The machine learning scheme

3) The machine learning scheme

In short, machine learning is nothing more than finding an algorithm that solves a specific problem through the best possible representation of model input and output data (the so-called training data), without the need to design or implement this algorithm.

Machine learning capabilities

Machine learning is used to solve a wide range of problems which are divided into three main types depending on the nature of the task:

  • Supervised learning
  • Unsupervised learning
  • Reinforcement learning

Machine learning capabilities

4) Machine learning capabilities

Within the context of this article, we will focus on the most popular supervised learning so far, which is most often used in the problems of data classification (e.g. what is present in a given image, OCR (optical character recognition), forgery or spam detection, etc.) and – what will be most interesting for us – regression (broadly understood forecasting, such as weather forecasting or the aforementioned share price).

Note that from year to year there is a very important development of reinforcement learning, especially in the context of solving real time decisions problems (e.g. autonomous cars or games of unimaginable complexity like chess or GO).

Artificial neural networks as a multi-purpose tool

Interestingly, most office workers who come into contact with spreadsheets (e.g. Microsoft Excel) on a daily basis often unknowingly use the benefits of machine learning to solve regression problems – for example, by creating a trend line on the data set depicted in the chart. Within a few seconds (mouse clicks) a straight line (linear regression) or a polynomial curve of any degree (polynomial regression as in the figure below) can be analytically determined.

              Polynomial regression in Microsoft Excel

5) Polynomial regression in Microsoft Excel

Linear or polynomial regression is an example tool used in supervised machine learning. With the prescribed straight/curve pattern we can easily make a forecast of future values. However, this is not always an optimal solution (as can be seen from Figure 5) and there are many other techniques that can be used to solve a specific problem. Some of them have been collected in the following graphic:

Machine learning methods and techniques

6) Machine learning methods and techniques

It cannot be overlooked that all the problems addressed by machine learning (not only those related to regression and classification, but also others such as clustering) can be successfully solved using Artificial Neural Networks.

Comparison of biological and artificial neuron

7) Comparison of biological and artificial neuron

Neural networks are a mathematical representation of the biological system of neurons in our brains. A single neuron, like the real one, processes signals – in a more mathematical language it performs the function of  which transforms the  input signal vector up to the  output signal :

machine learning

A detailed description of the operation and learning process of the neuron (selecting the appropriate values of weights ) is definitely a material for a separate, more technical article and I won’t go into further details here. What’s most important at this point is that single neurons can be connected together in networks with different topologies depending on the type of problem we want to solve, and the most popular network architectures include:

  • Multi-layer perceptron, MLP
    • Universal, simplest network topology that can be used to solve any problem
  • Convolutional Neural Networks, CNN
    • Networks that are based on a mathematical convolution, most commonly used in 2D and 3D image processing
  • Recurrent Neural Networks, RNN, including Long-short-term memory neural network (LSTM)
    • Networks with special neurons having their own memory, used for speech recognition, text processing (NLP – natural language processing) or time series analysis
  • GAN (Generative Adversarial Networks)
    • Networks enabling generating artificial data which are indistinguishable from the originals (e.g. generating human faces, duplicating similar data sets, creating artificial scenes)

Data Science and Modeling

The effectiveness of models created using machine learning techniques is mainly based on the quality and quantity of data that will be used in the learning process. However, the acquisition of the relevant data is only the beginning, most often the raw data has to be analyzed and processed with great care before it can be used in the learning process. All the activities related to data preparation are called Data Science.

Data Science

8) Data Science

Typical activities preceding the modeling process include:

  • Cleanup of data
  • Initial analysis for correlations
  • Features reduction
  • Features extraction
  • Removal of outliers
  • Normalization
  • Data Balancing
  • Sequencing (for time series)

With the data prepared this way, you can proceed to the selection of the machine learning technique (the type of model you want to create, such as linear regression or MLP neural network) and the selection of appropriate learning parameters. Depending on the complexity of the task, the amount of data, model architecture, computing power of the equipment and many other factors, the process of learning itself can take from a few seconds to many hours/days. However, if we are lucky enough we are going to develop a model that will provide the functionality we are looking for (a ready-made algorithm, even though we don’t write a single line of code telling the machine how to solve this problem).

Prognosis of SARS-CoV-2 infections

The problem of predicting the number of coronavirus infections in Poland and around the world is not trivial and can be compared to an analysis of the stock market price. We do not know if tomorrow there won’t be another outbreak that nobody expected. The number of potential variables is very large, and what makes it even more difficult to solve the problem is the fact that the wave of infections is not simultaneous in all countries – in China we are already observing the expiration of the epidemic, and in Brazil the peak of incidence is probably just ahead of us. Furthermore – some countries show unusual patterns (e.g. Taiwan) and their presence increases the complexity of the task. Considering all this, it sounds like an excellent problem that we can try to solve with machine learning. From a technical point of view – we are dealing here with a time series regression task.

Access to the relevant data (a blessing in disguise) was not a big challenge – there are hundreds of all kinds of data sets collected on a regular basis on the Internet. Of course, the main focus should be on the data processing itself, part of Data Science (80% of the total time) and on the proper preparation of the learning set.

The next step was modeling, and thus the difficult decision to choose the right type of model. Considering the versatility of neural networks, I first applied MLP type networks, and then tried to use convolutional networks (which, contrary to appearances and common opinion, can be successfully used not only in image analysis, but also as an alternative to MLP or recurrent networks in time series modeling). Surprisingly, both architectures (MLP and CNN) have been able to satisfactorily map the disease curves for most countries around the globe and, moreover, they have made it possible to predict future values associated with the spread of the infection, which makes it possible to determine whether a country has already gotten over the hump or whether everything is still ahead.

Prediction of the number of confirmed COVID-19 infections in Poland

9) Prediction of the number of confirmed COVID-19 infections in Poland 7 days ahead as of May 25th, 2020

The precision of both models fluctuated between 70-75%, noting that the process of teaching convolutional networks was noticeably faster (this results directly from differences in topologies and the way MLP and CNN networks work). This result could be significantly improved by spending more time on the selection of appropriate learning parameters or using other types of models (like LSTM networks).

ThingWorx in the service of visualization

When creating models using machine learning techniques, integration with existing software or even simple visualization is a very common problem. ThingWorx software can be successfully used to integrate with any data source and then create powerful web applications that provide the desired functionality.

Concerning coronavirus infection prediction, an application has been implemented in ThingWorx that integrates with the Python model (with Keras/TensorFlow/Flask libraries). It enables us to choose any country, analyze historical data about the disease and make predictions about future values (up to 90 days forward). Moreover, ThingWorx processes raw data obtained by the model ‘on-the-fly’ and, using numerical methods, flattens the curves (so-called smoothing) in order to analyze the trend curve more precisely.

Model operation visualization in ThingWorx

10) Model operation visualization in ThingWorx (with additional curve flattening)

Artificial Intelligence as the thing of the future?

Considering the fact that machine learning can be applied wherever the definition of an algorithm is non-trivial, we could say that traditional programming will be gone – why bother and think about designing an algorithm and implementing a program while the machine can “learn” how such an algorithm should look like and do all the “dirty work” for us – and it can do it quite effectively, as shown in this article and the results obtained during the prognosis of confirmed SARS-CoV-2 infections. And this is probably true, as over the next few years technologies related to AI and machine learning will probably become a standard in the service portfolio of most of today’s “traditional” programmers.

If you are looking for Internet of Things and Data Science solutions feel free to contact us!

_All posts in this category

blogpost
Articles

Lesson Learned Explained: Improving KPIs in the FMCG Industry through automation and data analysis on semi-automated production lines

Introduction In the highly competitive food and beverage industry, achieving optimal Key Performance Indicators (KPIs) such as availability, performance, and quality is essential for maximizing operational efficiency and profitability. A client operating semi-automated production lines was experiencing persistent underperformance in these KPIs. To address this issue, the company required a robust and precise data-driven approach […]

Read more
blogpost
Articles

Lesson Learned Explained: how proper data collection and storage proved crucial in predictive maintenance

In the aerospace and defense industry, which is characterized by particularly high requirements for precision and reliability, key performance indicators in maintenance, failure prediction or machine condition monitoring, are crucial.

Read more
blogpost
Articles

Industry 4.0 in the context of manufacturing companies

Industry 4.0, also referred to as the fourth industrial revolution, is a concept encompassing a complex process of technological and organizational transformation of companies, which began in 2013.

Read more
blogpost
Articles

OEE: is your company stuck in a manipulation trap?

If you think OEE has no secrets to you and your plant maintain highest OEE results… think again. Harsh truth is that most manufacturing plants’ OEE land somewhere between 35 and 43%. They just don’t know about that.

Read more
blogpost
Articles

How to increase production efficiency without investments in the shop floor?

You don't have to replace your machines with the new ones to make your production "smarter" and more efficient. Your shop floor is a data mine, and digitization is the key to unlock its value.

Read more
blogpost
Articles

Navigating ThingWorx: Expert Solutions for IoT Challenges

Whether you're a seasoned user or new to ThingWorx, overcoming these hurdles is crucial for IoT success. In this blog, we'll uncover the top challenges, offer tips for newcomers, discuss strategies to enhance your ThingWorx experience, and explore the importance of upgrading your ThingWorx solution.

Read more
blogpost
Articles

5 ways Manufacturers Can reduce energy Costs 

Very often overlooked or accepted as-is due to being an integral part of the production – in times of crisis and cost-cutting, it can become a major factor that improves the bottom line of your organization. Where to look for significant energy savings to reduce energy costs? How manufacturers should focus on these goals to make an impact? 

Read more
blogpost
Articles

5 steps to increase energy efficiency for Manufacturers

According to the German Federal Statistical Office, energy consumption by the industry for the production of goods hardly changed between 1995 and 2019. In 2019, it amounted to 3,874 petajoules. This means that it remains at the same level as in previous years. Germany plans to halve its primary consumption of energy by 2050, with the industry having to take part. In the era of the energy crisis, the drive to improve corporate energy efficiency is entering a new level.

Read more
blogpost
Articles

7 ways how data visibility helps manufacturing improve efficiency

In the manufacturing industry, efficiency is key to staying competitive and profitable. One way to improve efficiency is through data visibility. By having access to real-time visibility of the operational data throughout the manufacturing process, companies can identify bottlenecks, monitor production lines, and make data-driven decisions. In this article, we'll explore how data visibility can help manufacturing companies improve their efficiency and ultimately their bottom line.

Read more
blogpost
Articles

Energy Advisor for Manufacturing – energy savings for industry

Energy consumption bills have been a major focus in virtually all areas of industry for many years, and the current global situation is a factor driving up demand for solutions that make it easier to monitor energy consumption or save energy. In an industrial environment, where the cost of utilities has always been one of the main business drivers, the latest twists and turns in the global economy: inflation, natural resources supply challenges and the threat of fluctuating and unpredictable increases in energy costs – are arguably the most important economic factors these days.

Read more
blogpost
Articles

Digital Transformation – technological trends for the successful evolution of the automotive industry

The new opportunities associated with Industry 4.0 require companies to adapt to the new environment. In this article, we take a closer look at the current situation in the automotive industry, discuss the challenges it faces and the opportunities offered by digital transformation.

Read more
blogpost
Articles

Here’s why you should use Azure Cloud for your IoT Solutions

Digital transformation is reshaping the way how people, products, assets, data, and operations are connected to create an outcome for the customers and switch digital data into the customer experience. Digital technologies create new business opportunities across the globe and enable the evolution of enterprise, products and processes for valuable capabilities. The article describes the Internet of Things concept and shows how to use cloud infrastructure to take advantage of the digital transformation in business.

Read more
blogpost
Articles

IoT Data Visualization

Internet of Things systems have one huge advantage – they can collect lots of data. Temperature, items produced, amount of remaining liquids, humidity, machine uptime, damaged products, vehicle routes, electricity used. Based on this, we can get even more value by calculating KPIs to indicate how close to perfect our system is. Going manually through an endless stream of numbers changing every couple of hours is impossible and inefficient. The simple solution is to visualize the data by using a carefully selected chart type, that will exponentially increase its value. In this article, I want to show you the benefits of good data visualization and explain how it can be applied in your solution.

Read more
blogpost
Articles

Coronavirus & production continuity – IoT & AR for industry

The sudden epidemic of SARS-CoV-2 coronavirus and the COVID-19 disease has affected every sphere of the modern world. Caused by an epidemiological threat, the restriction of the flow of people, goods and services has already negatively affected the continuity of production processes in many industries, and each day this situation persists, without credible forecasts of a return to normality, will pull others into the spiral of detention threats.

Read more
blogpost
Articles

Horizontal Scalability in ThingWorx 9

Scalability in web applications has become crucial in the past years. An ever-growing number of devices and clients, connected to the Internet, makes it difficult to handle the traffic by a single server. Scalability is a characteristic of a system that tells if expanding the resources of a server(s) will make it run faster (or handle more load).

Read more
blogpost
Articles

High Availability in IoT applications

Modern web applications that serve data and content to millions of users run in clustered environments. Dealing with a huge amount of connections at the same time requires many resources. That resources are CPU time and RAM. Each and every connection produces an additional load on the server. Having just one server would require a vast amount of resources and we already know that Moore's Law is no longer valid. That said we need multiple servers ready to respond to users’ requests. Web applications use HTTP(S) protocol which works in the request-response communication method. Upon user's request, the server will prepare the response and send it back. Every response needs to be processed by the server and that's the key factor in provisioning resources for the server - requests may be different, starting from simple static data like CSS or images to more demanding like requesting data from database, filtering or calculating certain data.

Read more
blogpost
Articles

IoT Hub Connector for ThingWorx – Connecting ThingWorx Platform with The Azure Cloud

The ThingWorx IoT Hub Connector is the bridge that connects the ThingWorx platform to the Azure cloud (more specifically to Azure IoT Hub). It provides secure (certificate-based) communication, thanks to which we can use the enormous possibilities of cloud computing. It is also a very extensive, but generic solution.

Read more
blogpost
Articles

What is AIoT? Artificial Intelligence of Things in Industry 4.0

Synergy, this is how you can define this natural combination of technologies that will significantly affect the appearance of the future of production. Recently, in addition to the Internet of Things (IoT), artificial intelligence (AI) is gaining more and more popularity. The connection of these two technological trends heralds a real revolution in industry 4.0.

Read more
blogpost
Articles

What’s new in ThingWorx 9.0?

This year's Liveworx, due to the global situation caused by the COVID-19 pandemic, has exceptionally been held only online. On the very first day it was announced that a new version of ThingWorx - the most popular platform maximizing the potential of the industrial Internet of Things - will be released for commercial use. According to the announcements of Joe Biron, CTO responsible for IoT technology at PTC, it is supposed to be faster, cheaper and more effective.

Read more
blogpost
Articles

5G network – the key to the Industrial Internet of Things

The Industrial Internet of Things changes our view on the classic concept of production today. The largest manufacturing companies are eager to reach for technological solutions that streamline and increase the efficiency of production processes. With the development of subsequent technologies, interest in the concept of industry 4.0 increases, and thus, the number of connected devices. To meet the demand for infrastructure with adequate capacity and speed it was necessary to evolve towards the next generation of networks - 5G. How will 5G affect the development of Factories of the future and why is this crucial from the perspective of the Internet of Things? You will learn everything from the article.

Read more
blogpost
Articles

How is the Internet of Things changing the aviation industry?

The Internet of Things is being used more and more, and even global giants are already using the optimization or information gathering solutions. All this to improve existing processes, acquire, process and report more data, or even introduce new services for their clients, thereby increasing sales revenue. How is the Internet of Things changing the reality of the aviation industry?

Read more
blogpost
Articles

Rockwell Automation TechED EMEA 2019 shows that Industry 4.0 is closer than you think

Following up our partnership with Rockwell Automation, our team of business and technical experts found their way to Munich, Germany to participate in TechED EMEA. It is a unique event during which you can listen, talk and test the latest news in the field of industrial automation and directly participate in the next industrial revolution.

Read more
blogpost
Articles

Internet of Things and its impact on Automotive Industry

Nobody would be surprised by a statement that the Automotive industry is innovative in its nature. Cars are machines that historically revolutionized many areas of industry themselves, and today we can’t help but notice that the industry has not slowed down even for a moment and has always been focused on technological growth that serves both the business and its customers.

Read more
blogpost
Articles

Internet of Things in logistics

It might seem that the Internet of Things is dedicated only to industry. However, transport and logistics are closely connected to it, and they can also take advantage of the ongoing revolution. In the end, every industry uses transport services or logistic processes to some extent.

Read more
blogpost
Articles

LiveWorx 2019 – IoT trendsetting for next year

As every time for the last couple of years, our strong team of representatives was present in Boston to attend one of the most important IoT events of the year – LiveWorx, 2019 edition.   Get the ball rollin’   And even with 10 participants from various business areas, actively seeking new information and presentations, […]

Read more
blogpost
Articles

The fourth Industrial (R)evolution

Industry 4.0 and its foundation, the Internet of Things (IoT – especially in industrial version: IIoT), in the last years have dominated the way of thinking of advanced management concerning manufacturing business resources.

Read more
blogpost
Articles

How is ThingWorx different from Axeda and should you consider moving?

PTC is phasing out its Axeda platform. Although they look similar at first sight, Axeda and ThingWorx differ very much in capabilities.

Read more
blogpost
Articles

Are your data sources ready? InfluxDB support of ThingWorx

While ago, PTC announced a new release of ThingWorx Platform (8.4). Among other exciting features, this release has OOTB support for integration with InfluxDB.

Read more
blogpost
Articles

The Internet of Things – 9 trends for 2019!

The approach that has been underestimated for a long time is nowadays spreading its wings and becoming a crucial set of solutions for global corporations. However, not only for them as medium and small companies are following the biggest ones as well. Thus, the advantages of the Internet of Things have been recognized by everyone. […]

Read more
blogpost
Articles

Is now the time to invest in IoT?

Recent years were hyped about the Internet of Things (IoT) and how it was supposed to re-shape the whole industry. However, so far we’ve seen many more people talking about it than actually implementing it enterprise-wide. Is IoT mature enough to be “the real deal” and bring measurable value to businesses?   The term IoT […]

Read more

Let’s get in touch

Contact us