As we have previously discussed, within machine learning there are several techniques you can use to analyze your data. In the previous post we covered four common machine learning techniques, and this article covers three more for you to have in your back pocket.

Machine Learning Technique #5: Market Basket Analysis

Association rules are typically used for market basket analysis. Basically, you can look at things people buy and use it to predict other things that they might buy. How? Because by examining enough of these things, we can determine rules about which purchases are associated with other ones. For example, if somebody buys peanut butter then there is an X percent chance of buying jelly. A more complex rule (a rule of length 4) would be “if somebody buys spaghetti, tomato sauce and ground beef, then there is an X percent chance of buying parmesan cheese". These rules drive things like “you might be interested in…” when you are shopping on a web site.

Build a Data Lake for Free to Try Machine Learning Models

It turns out that you can use these rules in other ways, though. Perhaps you are responsible for operating some mechanical equipment. You could use association rules to track and uncover the relationships between, say, high temperature, pressure and vibration with a particular failure mode. So these kind of rules can help with root cause analysis.

Did you ever enjoy Gerber Singles? Or Colgate's packaged meals? How about Pepsi AM? All of those products and many others failed. But it turns out that some people liked them. And further research from MIT shows that some people consistently like products that turn out to fail. They called them "harbingers of failure". If you have this kind of business, perhaps you’d like to find this kind of consumer. Great way to get new insight about the likely success or failure of a new product you’re launching.

Machine Learning Technique #6: Time Series Data

Machine Learning Time Series Data

You all experience time series data because your heartbeat, as captured in this EKG, is an example of time series data. Every 50-150 or more times a minute, your heart beats. Multiple sensors on your body might be used to capture all the data about your heartbeat and muscle contractions many times a second and in aggregate that will give you a time series data set. And there are many other examples of time series data that you might experience in daily life:

  • Stock market opening and closing prices occur every 24 hours (holidays and weekends excluded).
  • Vibration, noise, pressure or similar readings from mechanical devices might be measured every hour, minute, second or less (depending on needs).
  • You could log energy consumption for houses, factories, subdivisions or entire cities.
  • Even economic data like unemployment figures can be treated as time series data.

With this kind of data you can make predictions about when some reading might hit a threshold, what energy use might be at some given point in the future, or remove systematic time-based biases from data as when unemployment figures are adjusted to reflect seasonal ups and downs based on things like temporary holiday workers, people to bring in the harvest etc. Unemployment among ski instructors, for example, is higher in the summer than winter.

Machine Learning Technique #7: Neural Networks

Strictly speaking, neural networks are a type of algorithm. I cover them here as a technique because there’s such interest in understanding what they are and how they work.

The idea behind neural networks is to simulate the way in which human brains work using artificial neurons. Let’s start by taking a brief look at what they are.

Machine Learning Neuron Bias Weight

A neuron is conceptually fairly simple. It has one or more inputs and an output. Depending on the value of those inputs, the neuron may “fire”. Simplistically, “firing” means that the output goes from off to on (think of it like a binary switch going from 0 to 1). In practice, neural networks based on neurons that flip like a binary switch can be unstable, so they generally have a pattern more like that s-shaped curve: 0 for a bit, then a fast (but not instantaneous) transition to a 1.

There are two other concepts that you should know about, called “weight” and “bias”. Not all inputs to a neuron are equal; some are more important than others and are given more weight. For example, if you are going to a fancy dinner with friends, when picking the restaurant you might want to give more weight to the opinion of the foodie than to the fast food aficionado.

Finally, for this section at least, there is the concept of bias. What that really means is how likely is the neuron to fire in the first place. For example, when I say “let’s go for a walk” our labrador puppy is at the front door before I’ve found the leash while the greyhound takes some more persuading. In this respect, some neurons are labrador puppies while others are retired racing greyhounds.

So now let’s look at a real problem that can be tackled by neural networks: recognizing handwriting, specifically the numbers 0-9. You can get a set of sample scanned digits from here if you want to try this yourself and you can find an excellent and in-depth explanation on this problem here. There are some detailed mathematics if you want that level of detail, but you can read it and skip the maths if you prefer. In this entry, I’ll just summarize the story to give you the general idea of how it all works.

Machine Learning Neural Networks

Those handwritten numbers were all scanned into 28 by 28 pixel images or 784 pixels in total. We’d start by having 784 input neurons on the left hand side, each of will fire based on the content of a single pixel in the scanned image. That hidden layer does some additional processing. And on the right hand side we’d need a total of 10 output neurons representing the possible answers, and we’d expect one and only one of them to fire with each image.

So how does this network generate accurate answers? The details are beyond this article (again, here’s the article with more details), but basically we train it with many known images and look at the answers generated. Using some complex maths it’s possible to tune all the weights and biases in the network such that we end up with a highly accurate tool for identifying handwritten numbers. In fact, because they are more accurate than other algorithms on problems like this neural networks are used to process hand-written checks, so you’ve almost certainly encountered them.

If that description of training the network on a set of known answers sounds familiar, then you were paying attention when you read the previous article. That’s actually the process for classification and what I described here is using an algorithm (a neural network) to do classification. Neural networks can also be used for regression problems.

A Little on Deep Learning

Finally, since we’re covering all the buzzwords in this article, let’s touch on deep learning. It’s broader than just neural networks, but one approach to deep learning could involve them. And as the name implies, rather than having a shallow network (here we have an input layer, and output layer, and just one hidden layer for a total of three layers), you could have a deep network with many more layers. Why do this? Because it enables looking at more data, and in a more sophisticated or nuanced way. This makes machine learning even more like a human.

So there you have it: different techniques for machine learning, and how they’re used to solve real business problems. If you’re ready for more, have a technical background and want to build and populate a data lake so you can give machine learning models a try, visit our website where you can try it for free

Source: Oracle Big Data Blog posts