Using Machine Learning and Deep Learning to Classify Wave Patterns

franky
2 min readApr 24, 2018

--

Figure 1. three kinds of wave patterns.

Let’s assume that we have three kinds of wave patterns as shown in Figure 1.

  • the pattern in blue shows data sampled from a sine function;
  • the pattern in red shows data sampled from a random distribution;
  • the pattern in green shows data sampled from a combination of three sine functions;

Say the blue curve indicates the pattern of my heartbeats in a normal condition, the red curve indicates the pattern of my heartbeats while I was watching World War Z, and the green curve indicates the pattern of my heartbeats while I was watching Iron Man. (Ok, I am joking here. Please check this link for a serious discussion.)

Here is our problem: If we have a lot of samples consisting of these three kinds of wave patterns, can machine learning algorithms correctly classify these wave patterns like general multi-class classification problems in supervised learning?

Simple answer? Yes! Both machine learning algorithms and deep learning mechanisms can correctly manage such multi-class classification problems. Here is a brief about the experiment.

  • Data: There are 10,000 wave patterns for training, and 10,000 wave patterns for testing. Each pattern has 500 data points. Three kinds of patterns are roughly evenly distributed in both training dataset and testing dataset.
  • Algorithm: Four machine learning classification algorithms under Scikit-Learn (i.e., Naive Bayes, Random Forest, Gradient Boosting, and Support Vector Machine as shown in Figure 2,) and one neural network architecture implemented by Keras (i.e., multilayer perceptron as shown in Figure 3) are tested.
  • Performance: All the classification methods can predict results with accuracy above 98% as shown in Figure 4.
Figure 2. four classification algorithms under Scikit-Learn
Figure 3. three layers multilayer perceptron implemented by Keras.
Figure 4. accuracy and execution time under different algorithms

Conclusions

This post has briefly described an multi-class classification problem on wave patterns. Before conducting the experiment, I have no idea how the results might look like. Because, as far as I know, no clear benchmark on classifying wave patterns similar to what have been done on MNIST or CIFAR. Although this trial gives some positive results, I feel that this is a tough problem in applications such as detecting heart disease and conducting condition monitoring. If you have any comments, please feel free to let me know. Thanks.

--

--

franky
franky

Responses (2)